gecko-dev/devtools/startup/aboutdebugging-registration.js
Kris Maglione a259026c9d Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8
This also removes any redundant Ci.nsISupports elements in the interface
lists.

This was done using the following script:

acecb401b7/processors/chromeutils-generateQI.jsm

MozReview-Commit-ID: AIx10P8GpZY

--HG--
extra : rebase_source : a29c07530586dc18ba040f19215475ac20fcfb3b
2018-04-22 20:55:06 -07:00

43 lines
1.5 KiB
JavaScript

/* 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/. */
"use strict";
// Register the about:debugging URL, that allows to debug various targets such as addons,
// workers and tabs by launching a dedicated DevTools toolbox for the selected target.
// If DevTools are not installed, this about page will display a shim landing page
// encouraging the user to download and install DevTools.
const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", {});
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm", {});
const { nsIAboutModule } = Ci;
function AboutDebugging() {}
AboutDebugging.prototype = {
uri: Services.io.newURI("chrome://devtools/content/aboutdebugging/aboutdebugging.xhtml"),
classDescription: "about:debugging",
classID: Components.ID("1060afaf-dc9e-43da-8646-23a2faf48493"),
contractID: "@mozilla.org/network/protocol/about;1?what=debugging",
QueryInterface: ChromeUtils.generateQI([nsIAboutModule]),
newChannel: function(uri, loadInfo) {
let chan = Services.io.newChannelFromURIWithLoadInfo(
this.uri,
loadInfo
);
chan.owner = Services.scriptSecurityManager.getSystemPrincipal();
return chan;
},
getURIFlags: function(uri) {
return nsIAboutModule.ALLOW_SCRIPT;
}
};
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([
AboutDebugging
]);