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

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

Issue 7624012: First pass on intents options UI. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Init values right. Created 9 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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 27 matching lines...) Expand all
38 event.target.getAttribute('contentType')); 38 event.target.getAttribute('contentType'));
39 OptionsPage.navigateToPage('contentExceptions'); 39 OptionsPage.navigateToPage('contentExceptions');
40 // Add on the proper hash for the content type, and store that in the 40 // Add on the proper hash for the content type, and store that in the
41 // history so back/forward and tab restore works. 41 // history so back/forward and tab restore works.
42 var hash = event.target.getAttribute('contentType'); 42 var hash = event.target.getAttribute('contentType');
43 window.history.replaceState({pageName: page.name}, page.title, 43 window.history.replaceState({pageName: page.name}, page.title,
44 '/' + page.name + "#" + hash); 44 '/' + page.name + "#" + hash);
45 }; 45 };
46 } 46 }
47 47
48 var manageHandlersButton = 48 var manageHandlersButton = $('manage-handlers-button');
49 this.pageDiv.querySelector('#manage-handlers-button');
50 if (manageHandlersButton) { 49 if (manageHandlersButton) {
51 manageHandlersButton.onclick = function(event) { 50 manageHandlersButton.onclick = function(event) {
52 OptionsPage.navigateToPage('handlers'); 51 OptionsPage.navigateToPage('handlers');
53 }; 52 };
54 } 53 }
55 54
55 var manageIntentsButton = $('manage-intents-button');
56 if (manageIntentsButton) {
57 manageIntentsButton.onclick = function(event) {
58 OptionsPage.navigateToPage('intents');
59 };
60 }
61
56 // Cookies filter page --------------------------------------------------- 62 // Cookies filter page ---------------------------------------------------
57 $('show-cookies-button').onclick = function(event) { 63 $('show-cookies-button').onclick = function(event) {
58 chrome.send('coreOptionsUserMetricsAction', ['Options_ShowCookies']); 64 chrome.send('coreOptionsUserMetricsAction', ['Options_ShowCookies']);
59 OptionsPage.navigateToPage('cookies'); 65 OptionsPage.navigateToPage('cookies');
60 }; 66 };
61 67
62 if (!templateData.enable_click_to_play) 68 if (!templateData.enable_click_to_play)
63 $('click_to_play').hidden = true; 69 $('click_to_play').hidden = true;
64 70
65 if (!templateData.enable_web_intents) 71 if (!templateData.enable_web_intents)
66 $('intent-filter').hidden = true; 72 $('intent-section').hidden = true;
67 }, 73 },
68 }; 74 };
69 75
70 ContentSettings.updateHandlersEnabledRadios = function(enabled) { 76 ContentSettings.updateHandlersEnabledRadios = function(enabled) {
71 var selector = '#content-settings-page input[type=radio][value=' + 77 var selector = '#content-settings-page input[type=radio][value=' +
72 (enabled ? 'allow' : 'block') + '].handler-radio'; 78 (enabled ? 'allow' : 'block') + '].handler-radio';
73 document.querySelector(selector).checked = true; 79 document.querySelector(selector).checked = true;
74 }; 80 };
75 81
76 /** 82 /**
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 'list[mode=' + mode + ']'); 145 'list[mode=' + mode + ']');
140 exceptionsList.patternValidityCheckComplete(pattern, valid); 146 exceptionsList.patternValidityCheckComplete(pattern, valid);
141 }; 147 };
142 148
143 // Export 149 // Export
144 return { 150 return {
145 ContentSettings: ContentSettings 151 ContentSettings: ContentSettings
146 }; 152 };
147 153
148 }); 154 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/content_settings.html ('k') | chrome/browser/resources/options/intents_list.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698