Chromium Code Reviews| 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..2b4cddeb4679b190e216804cc3cd0a8b4aa91cf7 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,18 @@ cr.define('options.contentSettings', function() { |
| this.contentElement.appendChild(videoSettingLabel); |
| } |
| + if (this.contentType == 'zoomlevels') { |
| + this.deletable = true; |
| + this.editable = false; |
|
Dan Beam
2014/03/15 15:28:51
nit: \n
battre
2014/03/17 23:00:19
Done.
|
| + 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 +555,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 +642,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'; |
| }, |
| /** |