1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 if (loadTimeData.getBoolean('newContentSettings')) {
7 cr.define('options', function() {
8 /** @const */ var OptionsPage = options.OptionsPage;
10 //////////////////////////////////////////////////////////////////////////////
11 // ContentSettings class:
14 * Encapsulated handling of content settings page.
17 function ContentSettings() {
18 this.activeNavTab = null;
19 OptionsPage.call(this, 'content',
20 loadTimeData.getString('contentSettingsPageTabTitle'),
21 'content-settings-page2');
24 cr.addSingletonGetter(ContentSettings);
26 ContentSettings.prototype = {
27 __proto__: OptionsPage.prototype,
29 initializePage: function() {
30 OptionsPage.prototype.initializePage.call(this);
32 $('content-settings-overlay-confirm2').onclick =
33 OptionsPage.closeOverlay.bind(OptionsPage);
37 ContentSettings.updateHandlersEnabledRadios = function(enabled) {
42 * Sets the values for all the content settings radios.
43 * @param {Object} dict A mapping from radio groups to the checked value for
46 ContentSettings.setContentFilterSettingsValue = function(dict) {
51 * Initializes an exceptions list.
52 * @param {string} type The content type that we are setting exceptions for.
53 * @param {Array} list An array of pairs, where the first element of each pair
54 * is the filter string, and the second is the setting (allow/block).
56 ContentSettings.setExceptions = function(type, list) {
60 ContentSettings.setHandlers = function(list) {
64 ContentSettings.setIgnoredHandlers = function(list) {
68 ContentSettings.setOTRExceptions = function(type, list) {
73 * Enables the Pepper Flash camera and microphone settings.
74 * Please note that whether the settings are actually showed or not is also
75 * affected by the style class pepper-flash-settings.
77 ContentSettings.enablePepperFlashCameraMicSettings = function() {
83 ContentSettings: ContentSettings