OLD | NEW |
1 /* | 1 /* |
2 * This Source Code is subject to the terms of the Mozilla Public License | 2 * This Source Code is subject to the terms of the Mozilla Public License |
3 * version 2.0 (the "License"). You can obtain a copy of the License at | 3 * version 2.0 (the "License"). You can obtain a copy of the License at |
4 * http://mozilla.org/MPL/2.0/. | 4 * http://mozilla.org/MPL/2.0/. |
5 */ | 5 */ |
6 | 6 |
7 const Cc = Components.classes; | 7 const Cc = Components.classes; |
8 const Ci = Components.interfaces; | 8 const Ci = Components.interfaces; |
9 const Cr = Components.results; | 9 const Cr = Components.results; |
10 const Cu = Components.utils; | 10 const Cu = Components.utils; |
11 | 11 |
12 let {Services, atob, btoa} = Cu.import("resource://gre/modules/Services.jsm", nu
ll); | 12 let {Services, atob, btoa, File} = Cu.import("resource://gre/modules/Services.js
m", null); |
13 | 13 |
14 let addonData = null; | 14 let addonData = null; |
15 | 15 |
16 function startup(params, reason) | 16 function startup(params, reason) |
17 { | 17 { |
18 addonData = params; | 18 addonData = params; |
19 | 19 |
20 {%- if hasChrome %} | 20 {%- if hasChrome %} |
21 if (Services.vc.compare(Services.appinfo.platformVersion, "10.0") < 0) | 21 if (Services.vc.compare(Services.appinfo.platformVersion, "10.0") < 0) |
22 { | 22 { |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 { | 180 { |
181 if (topic == "{{metadata.get('general', 'basename')}}-require") | 181 if (topic == "{{metadata.get('general', 'basename')}}-require") |
182 { | 182 { |
183 subject.wrappedJSObject.exports = require(data); | 183 subject.wrappedJSObject.exports = require(data); |
184 } | 184 } |
185 }, | 185 }, |
186 | 186 |
187 QueryInterface: XPCOMUtils.generateQI([Ci.nsISupportsWeakReference, Ci.nsIObse
rver]) | 187 QueryInterface: XPCOMUtils.generateQI([Ci.nsISupportsWeakReference, Ci.nsIObse
rver]) |
188 }; | 188 }; |
189 {%- endif %} | 189 {%- endif %} |
OLD | NEW |