1 // Copyright (c) 2011 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 cr
.define('options', function() {
7 //////////////////////////////////////////////////////////////////////////////
8 // ContentSettingsRadio class:
10 // Define a constructor that uses an input element as its underlying element.
11 var ContentSettingsRadio
= cr
.ui
.define('input');
13 ContentSettingsRadio
.prototype = {
14 __proto__
: HTMLInputElement
.prototype,
17 * Initialization function for the cr.ui framework.
19 decorate: function() {
23 this.addEventListener('change',
25 chrome
.send('setContentFilter', [this.name
, this.value
]);
31 * Whether the content setting is controlled by something else than the user's
32 * settings (either 'policy' or 'extension').
34 cr
.defineProperty(ContentSettingsRadio
, 'controlledBy', cr
.PropertyKind
.ATTR
);
36 //////////////////////////////////////////////////////////////////////////////
37 // HandlersEnabledRadio class:
39 // Define a constructor that uses an input element as its underlying element.
40 var HandlersEnabledRadio
= cr
.ui
.define('input');
42 HandlersEnabledRadio
.prototype = {
43 __proto__
: HTMLInputElement
.prototype,
46 * Initialization function for the cr.ui framework.
48 decorate: function() {
52 this.addEventListener('change',
54 chrome
.send('setHandlersEnabled', [this.value
== 'allow']);
61 ContentSettingsRadio
: ContentSettingsRadio
,
62 HandlersEnabledRadio
: HandlersEnabledRadio