Bug 813756 - Make nsINavigatorPayment out of global scope. r=smaug
authorWes Johnston <wjohnston@mozilla.com>
Mon, 06 May 2013 13:37:50 -0700
changeset 137857 cba2c26c95c4b9e79a54a5b59c1929f97dc38e9a
parent 137856 43cccb89e04a2a4232e12a690ff74d49c6b8da19
child 137858 4ca9a6bd8f64d8d8892362ef2e1cebde209907eb
push id3752
push userlsblakk@mozilla.com
push dateMon, 13 May 2013 17:21:10 +0000
treeherdermozilla-aurora@1580544aef0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs813756
milestone23.0a1
Bug 813756 - Make nsINavigatorPayment out of global scope. r=smaug
dom/payment/Payment.js
dom/payment/interfaces/moz.build
dom/payment/interfaces/nsIDOMNavigatorPayment.idl
dom/payment/interfaces/nsINavigatorPayment.idl
dom/tests/mochitest/general/test_interfaces.html
--- 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();