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');
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
return !(this.contentType == 'notifications' ||
this.contentType == 'location' ||
this.contentType == 'fullscreen' ||
- this.contentType == 'media-stream');
+ this.contentType == 'media-stream' ||
+ this.contentType == 'zoomlevels');
},
/**
},
};
- var OptionsPage = options.OptionsPage;
+ var Page = cr.ui.pageManager.Page;
+ var PageManager = cr.ui.pageManager.PageManager;
/**
* Encapsulated handling of content settings list subpage.
* @constructor
*/
function ContentSettingsExceptionsArea() {
- OptionsPage.call(this, 'contentExceptions',
- loadTimeData.getString('contentSettingsPageTabTitle'),
- 'content-settings-exceptions-area');
+ Page.call(this, 'contentExceptions',
+ loadTimeData.getString('contentSettingsPageTabTitle'),
+ 'content-settings-exceptions-area');
}
cr.addSingletonGetter(ContentSettingsExceptionsArea);
ContentSettingsExceptionsArea.prototype = {
- __proto__: OptionsPage.prototype,
+ __proto__: Page.prototype,
+ /** @override */
initializePage: function() {
- OptionsPage.prototype.initializePage.call(this);
+ Page.prototype.initializePage.call(this);
var exceptionsLists = this.pageDiv.querySelectorAll('list');
for (var i = 0; i < exceptionsLists.length; i++) {
this.showList('cookies');
$('content-settings-exceptions-overlay-confirm').onclick =
- OptionsPage.closeOverlay.bind(OptionsPage);
+ PageManager.closeOverlay.bind(PageManager);
},
/**
* @param {string} type The content type.
*/
showList: function(type) {
+ // Update the title for the type that was shown.
+ this.title = loadTimeData.getString(type + 'TabTitle');
+
var header = this.pageDiv.querySelector('h1');
header.textContent = loadTimeData.getString(type + '_header');
var mediaHeader = this.pageDiv.querySelector('.media-header');
mediaHeader.hidden = type != 'media-stream';
+
+ $('exception-behavior-column').hidden = type == 'zoomlevels';
+ $('exception-zoom-column').hidden = type != 'zoomlevels';
},
/**