Bug 813756 - Make nsINavigatorPayment out of global scope. r=smaug
--- a/dom/payment/Payment.js
+++ b/dom/payment/Payment.js
@@ -25,28 +25,28 @@ function debug (s) {
};
function PaymentContentHelper() {
};
PaymentContentHelper.prototype = {
__proto__: DOMRequestIpcHelper.prototype,
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIDOMNavigatorPayment,
+ QueryInterface: XPCOMUtils.generateQI([Ci.nsINavigatorPayment,
Ci.nsIDOMGlobalPropertyInitializer]),
classID: PAYMENTCONTENTHELPER_CID,
classInfo: XPCOMUtils.generateCI({
classID: PAYMENTCONTENTHELPER_CID,
contractID: "@mozilla.org/payment/content-helper;1",
classDescription: "Payment Content Helper",
flags: Ci.nsIClassInfo.DOM_OBJECT,
- interfaces: [Ci.nsIDOMNavigatorPayment]
+ interfaces: [Ci.nsINavigatorPayment]
}),
- // nsIDOMNavigatorPayment
+ // nsINavigatorPayment
pay: function pay(aJwts) {
let request = this.createRequest();
let requestId = this.getRequestId(request);
let docShell = this._window.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIWebNavigation)
.QueryInterface(Ci.nsIDocShell);
--- a/dom/payment/interfaces/moz.build
+++ b/dom/payment/interfaces/moz.build
@@ -1,16 +1,16 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
XPIDL_SOURCES += [
- 'nsIDOMNavigatorPayment.idl',
+ 'nsINavigatorPayment.idl',
'nsIDOMPaymentRequestInfo.idl',
'nsIPaymentFlowInfo.idl',
'nsIPaymentUIGlue.idl',
]
XPIDL_MODULE = 'dom_payment'
XPIDL_FLAGS += [
rename from dom/payment/interfaces/nsIDOMNavigatorPayment.idl
rename to dom/payment/interfaces/nsINavigatorPayment.idl
--- a/dom/payment/interfaces/nsIDOMNavigatorPayment.idl
+++ b/dom/payment/interfaces/nsINavigatorPayment.idl
@@ -1,17 +1,17 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "domstubs.idl"
interface nsIDOMDOMRequest;
-[scriptable, uuid(64e376f4-946e-406b-9360-bcfe78b53309)]
-interface nsIDOMNavigatorPayment : nsISupports
+[scriptable, uuid(44fb7308-7d7b-4975-8a27-e01fe9623bdb)]
+interface nsINavigatorPayment : nsISupports
{
// The 'jwts' parameter can be either a single DOMString or an array of
// DOMStrings. In both cases, it represents the base64url encoded and
// digitally signed payment information. Each payment provider should
// define its supported JWT format.
nsIDOMDOMRequest pay(in jsval jwts);
};
--- a/dom/tests/mochitest/general/test_interfaces.html
+++ b/dom/tests/mochitest/general/test_interfaces.html
@@ -543,16 +543,17 @@ var interfaceNamesInGlobalScope =
"GamepadAxisMoveEvent",
"SpeechRecognitionEvent",
"SpeechRecognitionError",
"SpeechSynthesisEvent",
"PushManager",
"StyleSheetAddedEvent",
"StyleSheetRemovedEvent",
"MozMobileMessageThread",
+ "PaymentRequestInfo",
]
// IMPORTANT: Do not change this list without review from a DOM peer!
// If your interface is named nsIDOMSomeInterface and you don't mean to expose
// it to every webpage, simply change its name to nsISomeInterface to fix this problem.
for (var i in SpecialPowers.Components.interfaces) {
var s = i.toString();