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 this.EXPORTED_SYMBOLS = ['RequestSyncApp'];
10 //dump('DEBUG RequestSyncApp: ' + s + '\n');
13 const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
15 Cu.import('resource://gre/modules/XPCOMUtils.jsm');
17 this.RequestSyncApp = function(aData) {
20 let keys = [ 'origin', 'manifestURL', 'isInBrowserElement' ];
21 for (let i = 0; i < keys.length; ++i) {
22 if (!(keys[i] in aData)) {
23 dump("ERROR - RequestSyncApp must receive a full app object: " + keys[i] + " missing.");
27 this["_" + keys[i]] = aData[keys[i]];
31 this.RequestSyncApp.prototype = {
32 classDescription: 'RequestSyncApp XPCOM Component',
33 classID: Components.ID('{5a0b64db-a2be-4f08-a6c5-8bf2e3ae0c57}'),
34 contractID: '@mozilla.org/dom/request-sync-manager;1',
35 QueryInterface: XPCOMUtils.generateQI([]),
42 return this._manifestURL;
45 get isInBrowserElement() {
46 return this._isInBrowserElement;