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 <include src="extension_error_overlay.js"></include> |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
107 this.handleDevControlsTransitionEnd_.bind(this)); | 107 this.handleDevControlsTransitionEnd_.bind(this)); |
108 | 108 |
109 // Set up the three dev mode buttons (load unpacked, pack and update). | 109 // Set up the three dev mode buttons (load unpacked, pack and update). |
110 $('load-unpacked').addEventListener('click', | 110 $('load-unpacked').addEventListener('click', |
111 this.handleLoadUnpackedExtension_.bind(this)); | 111 this.handleLoadUnpackedExtension_.bind(this)); |
112 $('pack-extension').addEventListener('click', | 112 $('pack-extension').addEventListener('click', |
113 this.handlePackExtension_.bind(this)); | 113 this.handlePackExtension_.bind(this)); |
114 $('update-extensions-now').addEventListener('click', | 114 $('update-extensions-now').addEventListener('click', |
115 this.handleUpdateExtensionNow_.bind(this)); | 115 this.handleUpdateExtensionNow_.bind(this)); |
116 | 116 |
117 // Set up the close dialog for the apps developer tools promo. | |
118 this.promoDismissed_ = false; | |
119 $('apps-developer-tools-promo').querySelector('.close-button'). | |
120 addEventListener('click', function(e) { | |
121 this.promoDismissed_ = true; | |
122 $('apps-developer-tools-promo').hidden = true; | |
Dan Beam
2014/04/18 22:34:23
do we actually still need this ^ code?
Devlin
2014/04/18 22:54:38
Whoops, gone.
| |
123 $('extension-settings').classList.remove('adt-promo'); | |
Dan Beam
2014/04/18 22:34:23
using the helpful magic mentioned later:
this.p
Devlin
2014/04/18 22:54:38
See below.
| |
124 }.bind(this)); | |
125 | |
117 if (!loadTimeData.getBoolean('offStoreInstallEnabled')) { | 126 if (!loadTimeData.getBoolean('offStoreInstallEnabled')) { |
118 this.dragWrapper_ = new cr.ui.DragWrapper(document.documentElement, | 127 this.dragWrapper_ = new cr.ui.DragWrapper(document.documentElement, |
119 dragWrapperHandler); | 128 dragWrapperHandler); |
120 } | 129 } |
121 | 130 |
122 extensions.PackExtensionOverlay.getInstance().initializePage(); | 131 extensions.PackExtensionOverlay.getInstance().initializePage(); |
123 | 132 |
124 // Hook up the configure commands link to the overlay. | 133 // Hook up the configure commands link to the overlay. |
125 var link = document.querySelector('.extension-commands-config'); | 134 var link = document.querySelector('.extension-commands-config'); |
126 link.addEventListener('click', | 135 link.addEventListener('click', |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
289 pageDiv.style.marginTop = marginTop + 'px'; | 298 pageDiv.style.marginTop = marginTop + 'px'; |
290 | 299 |
291 if (extensionsData.developerMode) { | 300 if (extensionsData.developerMode) { |
292 pageDiv.classList.add('dev-mode'); | 301 pageDiv.classList.add('dev-mode'); |
293 $('toggle-dev-on').checked = true; | 302 $('toggle-dev-on').checked = true; |
294 $('dev-controls').hidden = false; | 303 $('dev-controls').hidden = false; |
295 } else { | 304 } else { |
296 pageDiv.classList.remove('dev-mode'); | 305 pageDiv.classList.remove('dev-mode'); |
297 $('toggle-dev-on').checked = false; | 306 $('toggle-dev-on').checked = false; |
298 } | 307 } |
299 | 308 |
Dan Beam
2014/04/18 22:34:23
throw this somewhere
/**
* Updates (hides/sh
Devlin
2014/04/18 22:54:38
extensionsData is a local variable. :( We could m
| |
309 if (extensionsData.promoteAppsDevTools && !this.promoDismissed_) | |
310 pageDiv.classList.add('adt-promo'); | |
311 else | |
312 pageDiv.classList.remove('adt-promo'); | |
313 | |
300 $('load-unpacked').disabled = extensionsData.loadUnpackedDisabled; | 314 $('load-unpacked').disabled = extensionsData.loadUnpackedDisabled; |
301 | 315 |
302 ExtensionsList.prototype.data_ = extensionsData; | 316 ExtensionsList.prototype.data_ = extensionsData; |
303 var extensionList = $('extension-settings-list'); | 317 var extensionList = $('extension-settings-list'); |
304 ExtensionsList.decorate(extensionList); | 318 ExtensionsList.decorate(extensionList); |
305 } | 319 } |
306 | 320 |
307 // Indicate that warning |message| has occured for pack of |crx_path| and | 321 // Indicate that warning |message| has occured for pack of |crx_path| and |
308 // |pem_path| files. Ask if user wants override the warning. Send | 322 // |pem_path| files. Ask if user wants override the warning. Send |
309 // |overrideFlags| to repeated 'pack' call to accomplish the override. | 323 // |overrideFlags| to repeated 'pack' call to accomplish the override. |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
399 | 413 |
400 // Export | 414 // Export |
401 return { | 415 return { |
402 ExtensionSettings: ExtensionSettings | 416 ExtensionSettings: ExtensionSettings |
403 }; | 417 }; |
404 }); | 418 }); |
405 | 419 |
406 window.addEventListener('load', function(e) { | 420 window.addEventListener('load', function(e) { |
407 extensions.ExtensionSettings.getInstance().initialize(); | 421 extensions.ExtensionSettings.getInstance().initialize(); |
408 }); | 422 }); |
OLD | NEW |