2013-08-16 02:48:37 -07:00
|
|
|
/* 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";
|
|
|
|
|
|
|
|
const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
|
|
|
|
|
|
|
|
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
2013-12-01 22:45:33 -08:00
|
|
|
Cu.import("resource://gre/modules/InterAppCommService.jsm");
|
2013-08-16 02:48:37 -07:00
|
|
|
|
2014-04-29 23:34:42 -07:00
|
|
|
const DEBUG = false;
|
|
|
|
function debug(aMsg) {
|
|
|
|
dump("-- InterAppCommServiceProxy: " + Date.now() + ": " + aMsg + "\n");
|
|
|
|
}
|
|
|
|
|
2013-12-01 22:45:33 -08:00
|
|
|
function InterAppCommServiceProxy() {
|
2013-08-16 02:48:37 -07:00
|
|
|
}
|
|
|
|
|
2013-12-01 22:45:33 -08:00
|
|
|
InterAppCommServiceProxy.prototype = {
|
2013-08-16 02:48:37 -07:00
|
|
|
registerConnection: function(aKeyword, aHandlerPageURI, aManifestURI,
|
2014-04-17 03:57:02 -07:00
|
|
|
aDescription, aRules) {
|
2013-12-01 22:45:33 -08:00
|
|
|
InterAppCommService.
|
|
|
|
registerConnection(aKeyword, aHandlerPageURI, aManifestURI,
|
|
|
|
aDescription, aRules);
|
2013-08-16 02:48:37 -07:00
|
|
|
},
|
|
|
|
|
2014-04-29 23:34:42 -07:00
|
|
|
observe: function(aSubject, aTopic, aData) {
|
|
|
|
if (aTopic != "profile-after-change") {
|
|
|
|
if (DEBUG) {
|
|
|
|
debug("Should receive 'profile-after-change' only.");
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2013-08-16 02:48:37 -07:00
|
|
|
classID: Components.ID("{3dd15ce6-e7be-11e2-82bc-77967e7a63e6}"),
|
|
|
|
|
2014-04-29 23:34:42 -07:00
|
|
|
QueryInterface: XPCOMUtils.generateQI([Ci.nsIInterAppCommService,
|
|
|
|
Ci.nsIObserver])
|
2013-08-16 02:48:37 -07:00
|
|
|
}
|
|
|
|
|
2013-12-01 22:45:33 -08:00
|
|
|
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([InterAppCommServiceProxy]);
|