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 file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
9 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
10 Cu.import("resource://gre/modules/InterAppCommService.jsm");
13 function debug(aMsg) {
14 dump("-- InterAppCommServiceProxy: " + Date.now() + ": " + aMsg + "\n");
17 function InterAppCommServiceProxy() {
20 InterAppCommServiceProxy.prototype = {
21 registerConnection: function(aKeyword, aHandlerPageURI, aManifestURI,
22 aDescription, aRules) {
24 registerConnection(aKeyword, aHandlerPageURI, aManifestURI,
25 aDescription, aRules);
28 observe: function(aSubject, aTopic, aData) {
29 if (aTopic != "profile-after-change") {
31 debug("Should receive 'profile-after-change' only.");
37 classID: Components.ID("{3dd15ce6-e7be-11e2-82bc-77967e7a63e6}"),
39 QueryInterface: XPCOMUtils.generateQI([Ci.nsIInterAppCommService,
43 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([InterAppCommServiceProxy]);