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

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

Issue 7717016: Revert 97955 - First pass on intents options UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 = $('manage-handlers-button'); 48 var manageHandlersButton =
49 this.pageDiv.querySelector('#manage-handlers-button');
49 if (manageHandlersButton) { 50 if (manageHandlersButton) {
50 manageHandlersButton.onclick = function(event) { 51 manageHandlersButton.onclick = function(event) {
51 OptionsPage.navigateToPage('handlers'); 52 OptionsPage.navigateToPage('handlers');
52 }; 53 };
53 } 54 }
54 55
55 var manageIntentsButton = $('manage-intents-button');
56 if (manageIntentsButton) {
57 manageIntentsButton.onclick = function(event) {
58 OptionsPage.navigateToPage('intents');
59 };
60 }
61
62 // Cookies filter page --------------------------------------------------- 56 // Cookies filter page ---------------------------------------------------
63 $('show-cookies-button').onclick = function(event) { 57 $('show-cookies-button').onclick = function(event) {
64 chrome.send('coreOptionsUserMetricsAction', ['Options_ShowCookies']); 58 chrome.send('coreOptionsUserMetricsAction', ['Options_ShowCookies']);
65 OptionsPage.navigateToPage('cookies'); 59 OptionsPage.navigateToPage('cookies');
66 }; 60 };
67 61
68 if (!templateData.enable_click_to_play) 62 if (!templateData.enable_click_to_play)
69 $('click_to_play').hidden = true; 63 $('click_to_play').hidden = true;
70 64
71 if (!templateData.enable_web_intents) 65 if (!templateData.enable_web_intents)
72 $('intent-section').hidden = true; 66 $('intent-filter').hidden = true;
73 }, 67 },
74 }; 68 };
75 69
76 ContentSettings.updateHandlersEnabledRadios = function(enabled) { 70 ContentSettings.updateHandlersEnabledRadios = function(enabled) {
77 var selector = '#content-settings-page input[type=radio][value=' + 71 var selector = '#content-settings-page input[type=radio][value=' +
78 (enabled ? 'allow' : 'block') + '].handler-radio'; 72 (enabled ? 'allow' : 'block') + '].handler-radio';
79 document.querySelector(selector).checked = true; 73 document.querySelector(selector).checked = true;
80 }; 74 };
81 75
82 /** 76 /**
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 'list[mode=' + mode + ']'); 139 'list[mode=' + mode + ']');
146 exceptionsList.patternValidityCheckComplete(pattern, valid); 140 exceptionsList.patternValidityCheckComplete(pattern, valid);
147 }; 141 };
148 142
149 // Export 143 // Export
150 return { 144 return {
151 ContentSettings: ContentSettings 145 ContentSettings: ContentSettings
152 }; 146 };
153 147
154 }); 148 });
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