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

Unified Diff: chrome/browser/resources/options/content_settings_exceptions_area.js

Issue 197523002: Show Zoom Levels as content settings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged with ToT Created 6 years, 9 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/options/content_settings_exceptions_area.js
diff --git a/chrome/browser/resources/options/content_settings_exceptions_area.js b/chrome/browser/resources/options/content_settings_exceptions_area.js
index 31c6a5ed07ec9391f44baee12959246a0fd97992..80b7a9676ed48a0a7d2d389dd56d2155a78f9f58 100644
--- a/chrome/browser/resources/options/content_settings_exceptions_area.js
+++ b/chrome/browser/resources/options/content_settings_exceptions_area.js
@@ -104,8 +104,10 @@ cr.define('options.contentSettings', function() {
this.editable = false;
}
- this.addEditField(select, this.settingLabel);
- this.contentElement.appendChild(select);
+ if (this.contentType != 'zoomlevels') {
+ this.addEditField(select, this.settingLabel);
+ this.contentElement.appendChild(select);
+ }
select.className = 'exception-setting';
select.setAttribute('aria-labelledby', 'exception-behavior-column');
@@ -123,6 +125,19 @@ cr.define('options.contentSettings', function() {
this.contentElement.appendChild(videoSettingLabel);
}
+ if (this.contentType == 'zoomlevels') {
+ this.deletable = true;
+ this.editable = false;
+
+ var zoomLabel = cr.doc.createElement('span');
+ zoomLabel.textContent = this.dataItem.zoom;
+ zoomLabel.className = 'exception-setting';
+ zoomLabel.setAttribute('displaymode', 'static');
+ zoomLabel.setAttribute('aria-labelledby', 'exception-zoom-column');
+ this.contentElement.appendChild(zoomLabel);
+ this.zoomLabel = zoomLabel;
+ }
+
// Used to track whether the URL pattern in the input is valid.
// This will be true if the browser process has informed us that the
// current text in the input is valid. Changing the text resets this to
@@ -541,7 +556,8 @@ cr.define('options.contentSettings', function() {
return !(this.contentType == 'notifications' ||
this.contentType == 'location' ||
this.contentType == 'fullscreen' ||
- this.contentType == 'media-stream');
+ this.contentType == 'media-stream' ||
+ this.contentType == 'zoomlevels');
},
/**
@@ -627,6 +643,9 @@ cr.define('options.contentSettings', function() {
var mediaHeader = this.pageDiv.querySelector('.media-header');
mediaHeader.hidden = type != 'media-stream';
+
+ $('exception-behavior-column').hidden = type == 'zoomlevels';
+ $('exception-zoom-column').hidden = type != 'zoomlevels';
},
/**

Powered by Google App Engine
This is Rietveld 408576698