OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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: |
11 | 11 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 OptionsPage.navigateToPage('intents'); | 58 OptionsPage.navigateToPage('intents'); |
59 }; | 59 }; |
60 } | 60 } |
61 | 61 |
62 // Cookies filter page --------------------------------------------------- | 62 // Cookies filter page --------------------------------------------------- |
63 $('show-cookies-button').onclick = function(event) { | 63 $('show-cookies-button').onclick = function(event) { |
64 chrome.send('coreOptionsUserMetricsAction', ['Options_ShowCookies']); | 64 chrome.send('coreOptionsUserMetricsAction', ['Options_ShowCookies']); |
65 OptionsPage.navigateToPage('cookies'); | 65 OptionsPage.navigateToPage('cookies'); |
66 }; | 66 }; |
67 | 67 |
68 if (!templateData.enable_click_to_play) | |
69 $('click_to_play').hidden = true; | |
70 | |
71 if (!templateData.enable_web_intents && $('intent-section')) | 68 if (!templateData.enable_web_intents && $('intent-section')) |
72 $('intent-section').hidden = true; | 69 $('intent-section').hidden = true; |
73 }, | 70 }, |
74 }; | 71 }; |
75 | 72 |
76 ContentSettings.updateHandlersEnabledRadios = function(enabled) { | 73 ContentSettings.updateHandlersEnabledRadios = function(enabled) { |
77 var selector = '#content-settings-page input[type=radio][value=' + | 74 var selector = '#content-settings-page input[type=radio][value=' + |
78 (enabled ? 'allow' : 'block') + '].handler-radio'; | 75 (enabled ? 'allow' : 'block') + '].handler-radio'; |
79 document.querySelector(selector).checked = true; | 76 document.querySelector(selector).checked = true; |
80 }; | 77 }; |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 'list[mode=' + mode + ']'); | 142 'list[mode=' + mode + ']'); |
146 exceptionsList.patternValidityCheckComplete(pattern, valid); | 143 exceptionsList.patternValidityCheckComplete(pattern, valid); |
147 }; | 144 }; |
148 | 145 |
149 // Export | 146 // Export |
150 return { | 147 return { |
151 ContentSettings: ContentSettings | 148 ContentSettings: ContentSettings |
152 }; | 149 }; |
153 | 150 |
154 }); | 151 }); |
OLD | NEW |