Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(554)

Side by Side Diff: chrome/browser/resources/options2/content_settings_ui.js

Issue 10809005: Options: Rename chrome/browser/resources/options2 -> chrome/browser/resources/options. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix. Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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.
4
5 cr.define('options', function() {
6
7 //////////////////////////////////////////////////////////////////////////////
8 // ContentSettingsRadio class:
9
10 // Define a constructor that uses an input element as its underlying element.
11 var ContentSettingsRadio = cr.ui.define('input');
12
13 ContentSettingsRadio.prototype = {
14 __proto__: HTMLInputElement.prototype,
15
16 /**
17 * Initialization function for the cr.ui framework.
18 */
19 decorate: function() {
20 this.type = 'radio';
21 var self = this;
22
23 this.addEventListener('change',
24 function(e) {
25 chrome.send('setContentFilter', [this.name, this.value]);
26 });
27 },
28 };
29
30 /**
31 * Whether the content setting is controlled by something else than the user's
32 * settings (either 'policy' or 'extension').
33 * @type {string}
34 */
35 cr.defineProperty(ContentSettingsRadio, 'controlledBy', cr.PropertyKind.ATTR);
36
37 //////////////////////////////////////////////////////////////////////////////
38 // HandlersEnabledRadio class:
39
40 // Define a constructor that uses an input element as its underlying element.
41 var HandlersEnabledRadio = cr.ui.define('input');
42
43 HandlersEnabledRadio.prototype = {
44 __proto__: HTMLInputElement.prototype,
45
46 /**
47 * Initialization function for the cr.ui framework.
48 */
49 decorate: function() {
50 this.type = 'radio';
51 var self = this;
52
53 this.addEventListener('change',
54 function(e) {
55 chrome.send('setHandlersEnabled', [this.value == 'allow']);
56 });
57 },
58 };
59
60 // Export
61 return {
62 ContentSettingsRadio: ContentSettingsRadio,
63 HandlersEnabledRadio: HandlersEnabledRadio
64 };
65
66 });
67
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698