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

Unified Diff: chrome/browser/resources/extensions/extensions.js

Issue 12288052: Add managed user lock/unlock button for the extensions page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments and rebase to ToT. Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/extensions/extensions.js
diff --git a/chrome/browser/resources/extensions/extensions.js b/chrome/browser/resources/extensions/extensions.js
index e3d607837c0f262dcd8932ed5c43f8852c2044a9..b631d891c5d27ea9636803bf44ea55fcbafa682c 100644
--- a/chrome/browser/resources/extensions/extensions.js
+++ b/chrome/browser/resources/extensions/extensions.js
@@ -87,6 +87,14 @@ cr.define('extensions', function() {
$('dev-controls').addEventListener('webkitTransitionEnd',
this.handleDevControlsTransitionEnd_.bind(this));
+ $('unlock-button').addEventListener('click', function() {
+ chrome.send('setElevated', [true]);
+ });
+
+ $('lock-button').addEventListener('click', function() {
+ chrome.send('setElevated', [false]);
+ });
+
// Set up the three dev mode buttons (load unpacked, pack and update).
$('load-unpacked').addEventListener('click',
this.handleLoadUnpackedExtension_.bind(this));
@@ -244,14 +252,16 @@ cr.define('extensions', function() {
var pageDiv = $('extension-settings');
var marginTop = 0;
- if (extensionsData.profileIsManaged) {
- pageDiv.classList.add('showing-banner');
+ if (extensionsData.profileIsManaged)
pageDiv.classList.add('profile-is-managed');
not at google - send to devlin 2013/02/21 16:25:24 does this need an else: classList.remove('profile-
Adrian Kuegel 2013/02/21 16:39:00 Currently I think the profile is put in managed st
+ if (extensionsData.profileIsManaged && !extensionsData.profileIsElevated) {
+ pageDiv.classList.add('showing-banner');
+ pageDiv.classList.add('managed-user-locked');
$('toggle-dev-on').disabled = true;
marginTop += 45;
} else {
pageDiv.classList.remove('showing-banner');
- pageDiv.classList.remove('profile-is-managed');
+ pageDiv.classList.remove('managed-user-locked');
$('toggle-dev-on').disabled = false;
}
@@ -262,7 +272,7 @@ cr.define('extensions', function() {
}
pageDiv.style.marginTop = marginTop + 'px';
- if (extensionsData.developerMode && !extensionsData.profileIsManaged) {
+ if (extensionsData.developerMode) {
pageDiv.classList.add('dev-mode');
$('toggle-dev-on').checked = true;
$('dev-controls').hidden = false;

Powered by Google App Engine
This is Rietveld 408576698