Chromium Code Reviews| Index: chrome/browser/resources/options/content_settings_ui.js |
| diff --git a/chrome/browser/resources/options/content_settings_ui.js b/chrome/browser/resources/options/content_settings_ui.js |
| index 45ba7888a56a524c549e06ab00c4347cc66b120f..fd61a0993c948dee787d02a219b356f9b3686219 100644 |
| --- a/chrome/browser/resources/options/content_settings_ui.js |
| +++ b/chrome/browser/resources/options/content_settings_ui.js |
| @@ -27,9 +27,33 @@ cr.define('options', function() { |
| }, |
| }; |
| + ////////////////////////////////////////////////////////////////////////////// |
| + // HandlersEnabledRadio class: |
| + |
| + // Define a constructor that uses an input element as its underlying element. |
| + var HandlersEnabledRadio = cr.ui.define('input'); |
| + |
| + HandlersEnabledRadio.prototype = { |
| + __proto__: HTMLInputElement.prototype, |
| + |
| + /** |
| + * Initialization function for the cr.ui framework. |
| + */ |
| + decorate: function() { |
| + this.type = 'radio'; |
| + var self = this; |
| + |
| + this.addEventListener('change', |
| + function(e) { |
| + chrome.send('setHandlersEnabled', [this.value == 'allow']); |
|
tony
2011/05/23 21:42:00
Why doesn't this use the ContentSettingsRadio/setC
koz (OOO until 15th September)
2011/05/24 08:47:49
We're managing a different kind of data here - the
|
| + }); |
| + }, |
| + }; |
| + |
| // Export |
| return { |
| - ContentSettingsRadio: ContentSettingsRadio |
| + ContentSettingsRadio: ContentSettingsRadio, |
| + HandlersEnabledRadio: HandlersEnabledRadio |
| }; |
| }); |