Bug 1550519 - Show a translucent parent highlight when a subgrid is highlighted....
[gecko.git] / remote / command-line-handler.js
blob82db44e5004e80e30cd49acb304eef9da7050c64
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 "use strict";
7 // Stopgap module until we can land bug 1536862 and remove this temporary file
9 const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
10 const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
12 ChromeUtils.defineModuleGetter(this, "RemoteAgent",
13     "chrome://remote/content/RemoteAgent.jsm");
15 const RemoteAgentFactory = {
16   createInstance(outer, iid) {
17     if (outer) {
18       throw Cr.NS_ERROR_NO_AGGREGATION;
19     }
20     // we can't use Preferences.jsm before first paint
21     if (!Services.prefs.getBoolPref("remote.enabled")) {
22       return {};
23     }
25     return RemoteAgent.QueryInterface(iid);
26   },
29 function RemoteAgentComponent() {}
31 RemoteAgentComponent.prototype = {
32     classDescription: "Remote Agent",
33     classID: Components.ID("{8f685a9d-8181-46d6-a71d-869289099c6d}"),
34     contractID: "@mozilla.org/remote/agent",
35     _xpcom_factory: RemoteAgentFactory,  /* eslint-disable-line */
38 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([RemoteAgentComponent]);