summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkusheintz@chromium.org <markusheintz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-30 11:38:24 +0000
committermarkusheintz@chromium.org <markusheintz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-30 11:38:24 +0000
commit0c6180272aaa1e81521efea3fbfd5ac0a25cc953 (patch)
treeaf523c93f6648b720edb76f1d35ab9e3c45552b4
parent3d97aba888ea34218f514b485e8d4d0ce18c1be9 (diff)
downloadchromium_src-0c6180272aaa1e81521efea3fbfd5ac0a25cc953.zip
chromium_src-0c6180272aaa1e81521efea3fbfd5ac0a25cc953.tar.gz
chromium_src-0c6180272aaa1e81521efea3fbfd5ac0a25cc953.tar.bz2
Add CSS style and JS code to lock content settings exceptions in the WebUI if they are managed by extensions.
In the content settings exceptions settings UI, extension managed exceptions will be locked and marked with a yellow background and an extension icon. BUG=98258 TEST=Set a content settings exceptions using an extension (e.g. the sample extension for the content settings extension API). Open the settings for content settings exceptions and verify that the set exception is marked yellow and with a small extension icon. Review URL: http://codereview.chromium.org/7261020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103454 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/resources/options/content_settings.css12
-rw-r--r--chrome/browser/resources/options/content_settings_exceptions_area.js8
2 files changed, 13 insertions, 7 deletions
diff --git a/chrome/browser/resources/options/content_settings.css b/chrome/browser/resources/options/content_settings.css
index fbbf364..625ab18 100644
--- a/chrome/browser/resources/options/content_settings.css
+++ b/chrome/browser/resources/options/content_settings.css
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2010 The Chromium Authors. All rights reserved.
+Copyright (c) 2011 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
*/
@@ -56,9 +56,8 @@ div[role="listitem"][managedby] {
position: relative;
}
-div[role="listitem"][managedby="policy"][selected][lead],
-div[role="listitem"][managedby="policy"][selected],
-div[role="listitem"][managedby="policy"] {
+.settings-list div[role="listitem"][managedby="policy"],
+.settings-list div[role="listitem"][managedby="extension"] {
background: -webkit-linear-gradient(#fff1b5, #fae692);
border-top: 0;
border-bottom: 1px solid #c9bd8d;
@@ -68,3 +67,8 @@ list div[role="listitem"][managedby="policy"] .close-button {
background-image: url("chrome://theme/IDR_MANAGED");
opacity: 1;
}
+
+list div[role="listitem"][managedby="extension"] .close-button {
+ background-image: url("chrome://theme/IDR_EXTENSIONS_SECTION_SMALL");
+ opacity: 1;
+}
diff --git a/chrome/browser/resources/options/content_settings_exceptions_area.js b/chrome/browser/resources/options/content_settings_exceptions_area.js
index 6f1d826..4f544b2 100644
--- a/chrome/browser/resources/options/content_settings_exceptions_area.js
+++ b/chrome/browser/resources/options/content_settings_exceptions_area.js
@@ -115,9 +115,11 @@ cr.define('options.contentSettings', function() {
this.editable = false;
}
- // If the source of the content setting exception is a policy, then the
- // content settings exception is managed and the user can't edit it.
- if (this.dataItem.source == 'policy') {
+ // If the source of the content setting exception is not the user
+ // preference, then the content settings exception is managed and the user
+ // can't edit it.
+ if (this.dataItem.source &&
+ this.dataItem.source != 'preference') {
this.setAttribute('managedby', this.dataItem.source);
this.deletable = false;
this.editable = false;