summaryrefslogtreecommitdiff
path: root/chromium/chrome/browser/resources/options/content_settings2.js
blob: 7c6d95137e3782fa156f38469509d5ee8da2eb9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
// Copyright (c) 2012 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.

if (loadTimeData.getBoolean('newContentSettings')) {

cr.define('options', function() {
  /** @const */ var OptionsPage = options.OptionsPage;

  //////////////////////////////////////////////////////////////////////////////
  // ContentSettings class:

  /**
   * Encapsulated handling of content settings page.
   * @constructor
   */
  function ContentSettings() {
    this.activeNavTab = null;
    OptionsPage.call(this, 'content',
                     loadTimeData.getString('contentSettingsPageTabTitle'),
                     'content-settings-page2');
  }

  cr.addSingletonGetter(ContentSettings);

  ContentSettings.prototype = {
    __proto__: OptionsPage.prototype,

    initializePage: function() {
      OptionsPage.prototype.initializePage.call(this);

      $('content-settings-overlay-confirm2').onclick =
          OptionsPage.closeOverlay.bind(OptionsPage);
    },
  };

  ContentSettings.updateHandlersEnabledRadios = function(enabled) {
    // Not implemented.
  };

  /**
   * Sets the values for all the content settings radios.
   * @param {Object} dict A mapping from radio groups to the checked value for
   *     that group.
   */
  ContentSettings.setContentFilterSettingsValue = function(dict) {
    // Not implemented.
  };

  /**
   * Initializes an exceptions list.
   * @param {string} type The content type that we are setting exceptions for.
   * @param {Array} list An array of pairs, where the first element of each pair
   *     is the filter string, and the second is the setting (allow/block).
   */
  ContentSettings.setExceptions = function(type, list) {
    // Not implemented.
  };

  ContentSettings.setHandlers = function(list) {
    // Not implemented.
  };

  ContentSettings.setIgnoredHandlers = function(list) {
    // Not implemented.
  };

  ContentSettings.setOTRExceptions = function(type, list) {
    // Not implemented.
  };

  /**
   * Enables the Pepper Flash camera and microphone settings.
   * Please note that whether the settings are actually showed or not is also
   * affected by the style class pepper-flash-settings.
   */
  ContentSettings.enablePepperFlashCameraMicSettings = function() {
    // Not implemented.
  }

  // Export
  return {
    ContentSettings: ContentSettings
  };

});

}