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 | 10 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 | 80 |
81 // This will request the data to show on the page and will get a response | 81 // This will request the data to show on the page and will get a response |
82 // back in returnExtensionsData. | 82 // back in returnExtensionsData. |
83 chrome.send('extensionSettingsRequestExtensionsData'); | 83 chrome.send('extensionSettingsRequestExtensionsData'); |
84 | 84 |
85 $('toggle-dev-on').addEventListener('change', | 85 $('toggle-dev-on').addEventListener('change', |
86 this.handleToggleDevMode_.bind(this)); | 86 this.handleToggleDevMode_.bind(this)); |
87 $('dev-controls').addEventListener('webkitTransitionEnd', | 87 $('dev-controls').addEventListener('webkitTransitionEnd', |
88 this.handleDevControlsTransitionEnd_.bind(this)); | 88 this.handleDevControlsTransitionEnd_.bind(this)); |
89 | 89 |
90 $('unlock-button').addEventListener('click', function() { | 90 if (!cr.isChromeOS) { |
91 chrome.send('setElevated', [true]); | 91 $('unlock-button').addEventListener('click', function() { |
92 }); | 92 chrome.send('setElevated', [true]); |
| 93 }); |
93 | 94 |
94 $('lock-button').addEventListener('click', function() { | 95 $('lock-button').addEventListener('click', function() { |
95 chrome.send('setElevated', [false]); | 96 chrome.send('setElevated', [false]); |
96 }); | 97 }); |
| 98 } |
97 | 99 |
98 // Set up the three dev mode buttons (load unpacked, pack and update). | 100 // Set up the three dev mode buttons (load unpacked, pack and update). |
99 $('load-unpacked').addEventListener('click', | 101 $('load-unpacked').addEventListener('click', |
100 this.handleLoadUnpackedExtension_.bind(this)); | 102 this.handleLoadUnpackedExtension_.bind(this)); |
101 $('pack-extension').addEventListener('click', | 103 $('pack-extension').addEventListener('click', |
102 this.handlePackExtension_.bind(this)); | 104 this.handlePackExtension_.bind(this)); |
103 $('update-extensions-now').addEventListener('click', | 105 $('update-extensions-now').addEventListener('click', |
104 this.handleUpdateExtensionNow_.bind(this)); | 106 this.handleUpdateExtensionNow_.bind(this)); |
105 | 107 |
106 if (!loadTimeData.getBoolean('offStoreInstallEnabled')) { | 108 if (!loadTimeData.getBoolean('offStoreInstallEnabled')) { |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 return { | 375 return { |
374 ExtensionSettings: ExtensionSettings | 376 ExtensionSettings: ExtensionSettings |
375 }; | 377 }; |
376 }); | 378 }); |
377 | 379 |
378 var ExtensionSettings = extensions.ExtensionSettings; | 380 var ExtensionSettings = extensions.ExtensionSettings; |
379 | 381 |
380 window.addEventListener('load', function(e) { | 382 window.addEventListener('load', function(e) { |
381 ExtensionSettings.getInstance().initialize(); | 383 ExtensionSettings.getInstance().initialize(); |
382 }); | 384 }); |
OLD | NEW |