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