Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: chrome/browser/resources/extensions/extensions.js

Issue 14066003: Don't allow elevation for CHROME_OS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bug in set_elevated function. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 return { 370 return {
369 ExtensionSettings: ExtensionSettings 371 ExtensionSettings: ExtensionSettings
370 }; 372 };
371 }); 373 });
372 374
373 var ExtensionSettings = extensions.ExtensionSettings; 375 var ExtensionSettings = extensions.ExtensionSettings;
374 376
375 window.addEventListener('load', function(e) { 377 window.addEventListener('load', function(e) {
376 ExtensionSettings.getInstance().initialize(); 378 ExtensionSettings.getInstance().initialize();
377 }); 379 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/extensions/extensions.html ('k') | chrome/browser/resources/history/history.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698