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

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

Issue 6249022: Make the gtk download shelf autoclose on mouse out. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: explicit Created 9 years, 10 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 var OptionsPage = options.OptionsPage; 7 var OptionsPage = options.OptionsPage;
8 8
9 ////////////////////////////////////////////////////////////////////////////// 9 //////////////////////////////////////////////////////////////////////////////
10 // ContentSettings class: 10 // ContentSettings class:
(...skipping 15 matching lines...) Expand all
26 26
27 initializePage: function() { 27 initializePage: function() {
28 OptionsPage.prototype.initializePage.call(this); 28 OptionsPage.prototype.initializePage.call(this);
29 29
30 chrome.send('getContentFilterSettings'); 30 chrome.send('getContentFilterSettings');
31 31
32 var exceptionsButtons = 32 var exceptionsButtons =
33 this.pageDiv.querySelectorAll('.exceptions-list-button'); 33 this.pageDiv.querySelectorAll('.exceptions-list-button');
34 for (var i = 0; i < exceptionsButtons.length; i++) { 34 for (var i = 0; i < exceptionsButtons.length; i++) {
35 exceptionsButtons[i].onclick = function(event) { 35 exceptionsButtons[i].onclick = function(event) {
36 ContentSettingsExceptionsArea.getInstance().showList( 36 // ContentSettingsExceptionsArea.getInstance().showList(
37 event.target.getAttribute('contentType')); 37 // event.target.getAttribute('contentType'));
38 OptionsPage.showPageByName('contentExceptions'); 38 OptionsPage.showPageByName('contentExceptions');
39 location.hash(event.target.getAttribute('contentType'));
sky 2011/01/31 20:36:25 You probably didn't intend to include this, did yo
39 }; 40 };
40 } 41 }
41 42
42 // Cookies filter page --------------------------------------------------- 43 // Cookies filter page ---------------------------------------------------
43 $('block-third-party-cookies').onclick = function(event) { 44 $('block-third-party-cookies').onclick = function(event) {
44 chrome.send('setAllowThirdPartyCookies', 45 chrome.send('setAllowThirdPartyCookies',
45 [String($('block-third-party-cookies').checked)]); 46 [String($('block-third-party-cookies').checked)]);
46 }; 47 };
47 48
48 $('show-cookies-button').onclick = function(event) { 49 $('show-cookies-button').onclick = function(event) {
49 chrome.send('coreOptionsUserMetricsAction', ['Options_ShowCookies']); 50 chrome.send('coreOptionsUserMetricsAction', ['Options_ShowCookies']);
50 OptionsPage.showPageByName('cookiesView'); 51 OptionsPage.showPageByName('cookiesView');
51 }; 52 };
52 53
53 if (!templateData.enable_click_to_play) 54 if (!templateData.enable_click_to_play)
54 $('click_to_play').style.display = 'none'; 55 $('click_to_play').style.display = 'none';
55 }, 56 },
56
57 /**
58 * Handles a hash value in the URL (such as bar in
59 * chrome://options/foo#bar).
60 * @param {string} hash The hash value.
61 */
62 handleHash: function(hash) {
63 ContentSettingsExceptionsArea.getInstance().showList(hash);
64 OptionsPage.showPageByName('contentExceptions');
65 },
66 }; 57 };
67 58
68 /** 59 /**
69 * Sets the values for all the content settings radios. 60 * Sets the values for all the content settings radios.
70 * @param {Object} dict A mapping from radio groups to the checked value for 61 * @param {Object} dict A mapping from radio groups to the checked value for
71 * that group. 62 * that group.
72 */ 63 */
73 ContentSettings.setContentFilterSettingsValue = function(dict) { 64 ContentSettings.setContentFilterSettingsValue = function(dict) {
74 for (var group in dict) { 65 for (var group in dict) {
75 document.querySelector('input[type=radio][name=' + group + '][value=' + 66 document.querySelector('input[type=radio][name=' + group + '][value=' +
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 ContentSettings.setClearLocalDataOnShutdownLabel = function(label) { 124 ContentSettings.setClearLocalDataOnShutdownLabel = function(label) {
134 $('clear-cookies-on-exit-label').innerText = label; 125 $('clear-cookies-on-exit-label').innerText = label;
135 }; 126 };
136 127
137 // Export 128 // Export
138 return { 129 return {
139 ContentSettings: ContentSettings 130 ContentSettings: ContentSettings
140 }; 131 };
141 132
142 }); 133 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698