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

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

Issue 7342009: Show a different banner in chrome://settings for extension-controlled settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 9 years, 5 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
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('options', function() { 5 cr.define('options', function() {
6 6
7 ////////////////////////////////////////////////////////////////////////////// 7 //////////////////////////////////////////////////////////////////////////////
8 // ContentSettingsRadio class: 8 // ContentSettingsRadio class:
9 9
10 // Define a constructor that uses an input element as its underlying element. 10 // Define a constructor that uses an input element as its underlying element.
11 var ContentSettingsRadio = cr.ui.define('input'); 11 var ContentSettingsRadio = cr.ui.define('input');
12 12
13 ContentSettingsRadio.prototype = { 13 ContentSettingsRadio.prototype = {
14 __proto__: HTMLInputElement.prototype, 14 __proto__: HTMLInputElement.prototype,
15 15
16 /** 16 /**
17 * Initialization function for the cr.ui framework. 17 * Initialization function for the cr.ui framework.
18 */ 18 */
19 decorate: function() { 19 decorate: function() {
20 this.type = 'radio'; 20 this.type = 'radio';
21 var self = this; 21 var self = this;
22 22
23 this.addEventListener('change', 23 this.addEventListener('change',
24 function(e) { 24 function(e) {
25 chrome.send('setContentFilter', [this.name, this.value]); 25 chrome.send('setContentFilter', [this.name, this.value]);
26 }); 26 });
27 }, 27 },
28 }; 28 };
29 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
30 ////////////////////////////////////////////////////////////////////////////// 37 //////////////////////////////////////////////////////////////////////////////
31 // HandlersEnabledRadio class: 38 // HandlersEnabledRadio class:
32 39
33 // Define a constructor that uses an input element as its underlying element. 40 // Define a constructor that uses an input element as its underlying element.
34 var HandlersEnabledRadio = cr.ui.define('input'); 41 var HandlersEnabledRadio = cr.ui.define('input');
35 42
36 HandlersEnabledRadio.prototype = { 43 HandlersEnabledRadio.prototype = {
37 __proto__: HTMLInputElement.prototype, 44 __proto__: HTMLInputElement.prototype,
38 45
39 /** 46 /**
(...skipping 11 matching lines...) Expand all
51 }; 58 };
52 59
53 // Export 60 // Export
54 return { 61 return {
55 ContentSettingsRadio: ContentSettingsRadio, 62 ContentSettingsRadio: ContentSettingsRadio,
56 HandlersEnabledRadio: HandlersEnabledRadio 63 HandlersEnabledRadio: HandlersEnabledRadio
57 }; 64 };
58 65
59 }); 66 });
60 67
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/content_settings.js ('k') | chrome/browser/resources/options/font_settings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698