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

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

Issue 2812063: Add starter code for 'Clear Browser Data' and 'Font Settings' overlay dialogs... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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 // 5 //
6 // AdvancedOptions class 6 // AdvancedOptions class
7 // Encapsulated handling of advanced options page. 7 // Encapsulated handling of advanced options page.
8 // 8 //
9 function AdvancedOptions() { 9 function AdvancedOptions() {
10 OptionsPage.call(this, 'advanced', templateData.advancedPage, 'advancedPage'); 10 OptionsPage.call(this, 'advanced', templateData.advancedPage, 'advancedPage');
11 } 11 }
12 12
13 cr.addSingletonGetter(AdvancedOptions); 13 cr.addSingletonGetter(AdvancedOptions);
14 14
15 AdvancedOptions.prototype = { 15 AdvancedOptions.prototype = {
16 // Inherit AdvancedOptions from OptionsPage. 16 // Inherit AdvancedOptions from OptionsPage.
17 __proto__: OptionsPage.prototype, 17 __proto__: OptionsPage.prototype,
18 18
19 // Initialize AdvancedOptions page. 19 // Initialize AdvancedOptions page.
20 initializePage: function() { 20 initializePage: function() {
21 // Call base class implementation to starts preference initialization. 21 // Call base class implementation to starts preference initialization.
22 OptionsPage.prototype.initializePage.call(this); 22 OptionsPage.prototype.initializePage.call(this);
23 23
24 // Setup click handlers for buttons. 24 // Setup click handlers for buttons.
25 $('privacyContentSettingsButton').onclick = function(event) { 25 $('privacyContentSettingsButton').onclick = function(event) {
26 OptionsPage.showPageByName('content'); 26 OptionsPage.showPageByName('content');
27 }; 27 };
28 $('privacyClearDataButton').onclick = function(event) { 28 $('privacyClearDataButton').onclick = function(event) {
29 // TODO(csilv): spawn clear data overlay dialog. 29 OptionsPage.showOverlay('clearBrowserDataOverlay');
30 }; 30 };
31 $('proxiesConfigureButton').onclick = function(event) { 31 $('proxiesConfigureButton').onclick = function(event) {
32 if (cr.isMac) { 32 chrome.send('showNetworkProxySettings');
33 chrome.send('showNetworkProxySettings');
34 } else {
35 // TODO(csilv): spawn network proxy settings sub-dialog.
36 }
37 }; 33 };
38 $('downloadLocationBrowseButton').onclick = function(event) { 34 $('downloadLocationBrowseButton').onclick = function(event) {
39 chrome.send('selectDownloadLocation'); 35 chrome.send('selectDownloadLocation');
40 }; 36 };
41 $('autoOpenFileTypesResetToDefault').onclick = function(event) { 37 $('autoOpenFileTypesResetToDefault').onclick = function(event) {
42 chrome.send('autoOpenFileTypesAction'); 38 chrome.send('autoOpenFileTypesAction');
43 }; 39 };
44 $('fontSettingsConfigureFontsOnlyButton').onclick = function(event) { 40 $('fontSettingsConfigureFontsOnlyButton').onclick = function(event) {
45 // TODO(csilv): spawn font settings sub-dialog. 41 OptionsPage.showOverlay('fontSettingsOverlay');
46 }; 42 };
47 $('certificatesManageButton').onclick = function(event) { 43 $('certificatesManageButton').onclick = function(event) {
48 chrome.send('showManageSSLCertificates'); 44 chrome.send('showManageSSLCertificates');
49 }; 45 };
50 46
51 if (cr.isWindows) { 47 if (cr.isWindows) {
52 $('sslCheckRevocation').onclick = function(event) { 48 $('sslCheckRevocation').onclick = function(event) {
53 chrome.send('checkRevocationCheckboxAction', 49 chrome.send('checkRevocationCheckboxAction',
54 [String($('sslCheckRevocation').checked)]); 50 [String($('sslCheckRevocation').checked)]);
55 }; 51 };
(...skipping 28 matching lines...) Expand all
84 80
85 // Set the checked state for the sslCheckRevocation checkbox. 81 // Set the checked state for the sslCheckRevocation checkbox.
86 function advancedOptionsSetCheckRevocationCheckboxState(checked) { 82 function advancedOptionsSetCheckRevocationCheckboxState(checked) {
87 $('sslCheckRevocation').checked = checked; 83 $('sslCheckRevocation').checked = checked;
88 } 84 }
89 85
90 // Set the checked state for the sslUseSSL2 checkbox. 86 // Set the checked state for the sslUseSSL2 checkbox.
91 function advancedOptionsSetUseSSL2CheckboxState(checked) { 87 function advancedOptionsSetUseSSL2CheckboxState(checked) {
92 $('sslUseSSL2').checked = checked; 88 $('sslUseSSL2').checked = checked;
93 } 89 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/options.html ('k') | chrome/browser/resources/options/clear_browser_data_overlay.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698