OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <include src="../uber/uber_utils.js"></include> | 5 <include src="../uber/uber_utils.js"></include> |
6 <include src="extension_commands_overlay.js"></include> | 6 <include src="extension_commands_overlay.js"></include> |
7 <include src="extension_focus_manager.js"></include> | 7 <include src="extension_focus_manager.js"></include> |
8 <include src="extension_list.js"></include> | 8 <include src="extension_list.js"></include> |
9 <include src="pack_extension_overlay.js"></include> | 9 <include src="pack_extension_overlay.js"></include> |
| 10 <include src="extension_error_overlay.js"></include> |
10 | 11 |
11 <if expr="pp_ifdef('chromeos')"> | 12 <if expr="pp_ifdef('chromeos')"> |
12 <include src="chromeos/kiosk_apps.js"></include> | 13 <include src="chromeos/kiosk_apps.js"></include> |
13 </if> | 14 </if> |
14 | 15 |
15 // Used for observing function of the backend datasource for this page by | 16 // Used for observing function of the backend datasource for this page by |
16 // tests. | 17 // tests. |
17 var webuiResponded = false; | 18 var webuiResponded = false; |
18 | 19 |
19 cr.define('extensions', function() { | 20 cr.define('extensions', function() { |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 $('pack-extension').addEventListener('click', | 114 $('pack-extension').addEventListener('click', |
114 this.handlePackExtension_.bind(this)); | 115 this.handlePackExtension_.bind(this)); |
115 $('update-extensions-now').addEventListener('click', | 116 $('update-extensions-now').addEventListener('click', |
116 this.handleUpdateExtensionNow_.bind(this)); | 117 this.handleUpdateExtensionNow_.bind(this)); |
117 | 118 |
118 if (!loadTimeData.getBoolean('offStoreInstallEnabled')) { | 119 if (!loadTimeData.getBoolean('offStoreInstallEnabled')) { |
119 this.dragWrapper_ = new cr.ui.DragWrapper(document.documentElement, | 120 this.dragWrapper_ = new cr.ui.DragWrapper(document.documentElement, |
120 dragWrapperHandler); | 121 dragWrapperHandler); |
121 } | 122 } |
122 | 123 |
123 var packExtensionOverlay = extensions.PackExtensionOverlay.getInstance(); | 124 extensions.PackExtensionOverlay.getInstance().initializePage(); |
124 packExtensionOverlay.initializePage(); | |
125 | 125 |
126 // Hook up the configure commands link to the overlay. | 126 // Hook up the configure commands link to the overlay. |
127 var link = document.querySelector('.extension-commands-config'); | 127 var link = document.querySelector('.extension-commands-config'); |
128 link.addEventListener('click', | 128 link.addEventListener('click', |
129 this.handleExtensionCommandsConfig_.bind(this)); | 129 this.handleExtensionCommandsConfig_.bind(this)); |
130 | 130 |
131 // Initialize the Commands overlay. | 131 // Initialize the Commands overlay. |
132 var extensionCommandsOverlay = | 132 extensions.ExtensionCommandsOverlay.getInstance().initializePage(); |
133 extensions.ExtensionCommandsOverlay.getInstance(); | 133 |
134 extensionCommandsOverlay.initializePage(); | 134 extensions.ExtensionErrorOverlay.getInstance().initializePage(); |
135 | 135 |
136 // Initialize the kiosk overlay. | 136 // Initialize the kiosk overlay. |
137 if (cr.isChromeOS) { | 137 if (cr.isChromeOS) { |
138 var kioskOverlay = extensions.KioskAppsOverlay.getInstance(); | 138 var kioskOverlay = extensions.KioskAppsOverlay.getInstance(); |
139 kioskOverlay.initialize(); | 139 kioskOverlay.initialize(); |
140 | 140 |
141 $('add-kiosk-app').addEventListener('click', function() { | 141 $('add-kiosk-app').addEventListener('click', function() { |
142 ExtensionSettings.showOverlay($('kiosk-apps-page')); | 142 ExtensionSettings.showOverlay($('kiosk-apps-page')); |
143 kioskOverlay.didShowPage(); | 143 kioskOverlay.didShowPage(); |
144 }); | 144 }); |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 return { | 407 return { |
408 ExtensionSettings: ExtensionSettings | 408 ExtensionSettings: ExtensionSettings |
409 }; | 409 }; |
410 }); | 410 }); |
411 | 411 |
412 var ExtensionSettings = extensions.ExtensionSettings; | 412 var ExtensionSettings = extensions.ExtensionSettings; |
413 | 413 |
414 window.addEventListener('load', function(e) { | 414 window.addEventListener('load', function(e) { |
415 ExtensionSettings.getInstance().initialize(); | 415 ExtensionSettings.getInstance().initialize(); |
416 }); | 416 }); |
OLD | NEW |