summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources/options/content_settings_ui.js
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-12 22:31:19 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-12 22:31:19 +0000
commitb781f63538c962d2d839c5d5f6914ff4843fe823 (patch)
tree0a68828b13c6603ede1315e8beafb1b6d8a9750b /chrome/browser/resources/options/content_settings_ui.js
parent191b5afba6e5cce70928dd84ab047743ace27076 (diff)
downloadchromium_src-b781f63538c962d2d839c5d5f6914ff4843fe823.zip
chromium_src-b781f63538c962d2d839c5d5f6914ff4843fe823.tar.gz
chromium_src-b781f63538c962d2d839c5d5f6914ff4843fe823.tar.bz2
First cut at the tabbed content settings page.
Missing pieces: - Add the other tabs besides the first two. - The tab switching mechanism might need some work (it definitely needs to look better, and perhaps should also work with the back/forward buttons). - none of the <button>s work - I added the Content Settings page as one of the main options pages for now, but in the end it should show up when a user clicks the "Content Settings..." button in Under the Hood. There is a bit of extra code because content settings don't use prefs, so I had to sort of replicate the pref_ui code. BUG=none TEST=manual Review URL: http://codereview.chromium.org/2804039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52139 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources/options/content_settings_ui.js')
-rw-r--r--chrome/browser/resources/options/content_settings_ui.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/chrome/browser/resources/options/content_settings_ui.js b/chrome/browser/resources/options/content_settings_ui.js
new file mode 100644
index 0000000..7dda236
--- /dev/null
+++ b/chrome/browser/resources/options/content_settings_ui.js
@@ -0,0 +1,26 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+////////////////////////////////////////////////////////////////////////////////
+// ContentSettingsRadio class:
+
+// Define a constructor that uses an input element as its underlying element.
+var ContentSettingsRadio = cr.ui.define('input');
+
+ContentSettingsRadio.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('setContentFilter', [this.name, this.value]);
+ });
+ },
+};