Bumping gaia.json for 1 gaia revision(s) a=gaia-bump
[gecko.git] / dom / apps / InterAppCommService.js
blobe30e3de7f49b76664247b621873edcb6210618f2
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/. */
5 "use strict";
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");
12 const DEBUG = false;
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) {
23     InterAppCommService.
24       registerConnection(aKeyword, aHandlerPageURI, aManifestURI,
25                          aDescription, aRules);
26   },
28   observe: function(aSubject, aTopic, aData) {
29     if (aTopic != "profile-after-change") {
30       if (DEBUG) {
31         debug("Should receive 'profile-after-change' only.");
32       }
33       return;
34     }
35   },
37   classID: Components.ID("{3dd15ce6-e7be-11e2-82bc-77967e7a63e6}"),
39   QueryInterface: XPCOMUtils.generateQI([Ci.nsIInterAppCommService,
40                                          Ci.nsIObserver])
43 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([InterAppCommServiceProxy]);