OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** @suppress {duplicate} */ | 5 /** @suppress {duplicate} */ |
6 var remoting = remoting || {}; | 6 var remoting = remoting || {}; |
7 | 7 |
8 (function(){ | 8 (function(){ |
9 | 9 |
10 'use strict'; | 10 'use strict'; |
11 | 11 |
12 /** | 12 /** |
13 * @constructor | 13 * @constructor |
14 */ | 14 */ |
15 var BackgroundPage = function() { | 15 var BackgroundPage = function() { |
16 /** @private {remoting.AppLauncher} */ | 16 /** @private {remoting.AppLauncher} */ |
17 this.appLauncher_ = null; | 17 this.appLauncher_ = null; |
18 /** @private {remoting.ActivationHandler} */ | 18 /** @private {remoting.ActivationHandler} */ |
19 this.activationHandler_ = null; | 19 this.activationHandler_ = null; |
20 /** @private {remoting.TelemetryEventWriter.Service} */ | 20 /** @private {remoting.TelemetryEventWriter.Service} */ |
21 this.telemetryService_ = null; | 21 this.telemetryService_ = null; |
| 22 /** @private {remoting.OptionsExporter} */ |
| 23 this.optionsExporter_ = null; |
22 /** @private */ | 24 /** @private */ |
23 this.disposables_ = new base.Disposables(); | 25 this.disposables_ = new base.Disposables(); |
24 this.preInit_(); | 26 this.preInit_(); |
25 }; | 27 }; |
26 | 28 |
27 /** | 29 /** |
28 * Initialize members and globals that are valid throughout the entire lifetime | 30 * Initialize members and globals that are valid throughout the entire lifetime |
29 * of the background page. | 31 * of the background page. |
30 * | 32 * |
31 * @private | 33 * @private |
(...skipping 10 matching lines...) Expand all Loading... |
42 | 44 |
43 if (base.isAppsV2()) { | 45 if (base.isAppsV2()) { |
44 this.appLauncher_ = new remoting.V2AppLauncher(); | 46 this.appLauncher_ = new remoting.V2AppLauncher(); |
45 this.telemetryService_ = remoting.TelemetryEventWriter.Service.create(); | 47 this.telemetryService_ = remoting.TelemetryEventWriter.Service.create(); |
46 this.telemetryService_.init(); | 48 this.telemetryService_.init(); |
47 this.activationHandler_ = new remoting.ActivationHandler( | 49 this.activationHandler_ = new remoting.ActivationHandler( |
48 base.Ipc.getInstance(), this.appLauncher_, this.telemetryService_); | 50 base.Ipc.getInstance(), this.appLauncher_, this.telemetryService_); |
49 this.disposables_.add(new base.EventHook( | 51 this.disposables_.add(new base.EventHook( |
50 this.activationHandler_, remoting.ActivationHandler.Events.windowClosed, | 52 this.activationHandler_, remoting.ActivationHandler.Events.windowClosed, |
51 this.telemetryService_.unbindSession.bind(this.telemetryService_))); | 53 this.telemetryService_.unbindSession.bind(this.telemetryService_))); |
| 54 this.optionsExporter_ = new remoting.OptionsExporter(); |
52 } else { | 55 } else { |
53 this.appLauncher_ = new remoting.V1AppLauncher(); | 56 this.appLauncher_ = new remoting.V1AppLauncher(); |
54 } | 57 } |
55 }; | 58 }; |
56 | 59 |
57 | 60 |
58 window.addEventListener('load', function() { | 61 window.addEventListener('load', function() { |
59 remoting.backgroundPage = new BackgroundPage(); | 62 remoting.backgroundPage = new BackgroundPage(); |
60 }, false); | 63 }, false); |
61 | 64 |
62 }()); | 65 }()); |
OLD | NEW |