[sql] Remove _HAS_EXCEPTIONS=0 from build info.
[chromium-blink-merge.git] / chrome / browser / resources / options / content_settings_ui.js
blob995b52aa24000ab6be0f5d1b75e62ba855e189c8
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,
16 /**
17 * Initialization function for the cr.ui framework.
19 decorate: function() {
20 this.type = 'radio';
21 var self = this;
23 this.addEventListener('change',
24 function(e) {
25 chrome.send('setContentFilter', [this.name, this.value]);
26 });
30 /**
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,
45 /**
46 * Initialization function for the cr.ui framework.
48 decorate: function() {
49 this.type = 'radio';
50 var self = this;
52 this.addEventListener('change',
53 function(e) {
54 chrome.send('setHandlersEnabled', [this.value == 'allow']);
55 });
59 // Export
60 return {
61 ContentSettingsRadio: ContentSettingsRadio,
62 HandlersEnabledRadio: HandlersEnabledRadio
65 });