OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // |
| 6 // AdvancedOptions class |
| 7 // Encapsulated handling of advanced options page. |
| 8 // |
| 9 function AdvancedOptions(model) { |
| 10 OptionsPage.call(this, 'advanced', templateData.advancedPage, 'advancedPage'); |
| 11 } |
| 12 |
| 13 AdvancedOptions.getInstance = function() { |
| 14 if (!AdvancedOptions.instance_) { |
| 15 AdvancedOptions.instance_ = new AdvancedOptions(null); |
| 16 } |
| 17 return AdvancedOptions.instance_; |
| 18 } |
| 19 |
| 20 AdvancedOptions.prototype = { |
| 21 // Inherit AdvancedOptions from OptionsPage. |
| 22 __proto__: OptionsPage.prototype, |
| 23 |
| 24 // Initialize AdvancedOptions page. |
| 25 initializePage: function() { |
| 26 // Call base class implementation to starts preference initialization. |
| 27 OptionsPage.prototype.initializePage.call(this); |
| 28 |
| 29 // Setup function handlers for buttons. |
| 30 $('privacyContentSettingsButton').onclick = function(event) { |
| 31 // TODO(csilv): spawn content settings sub-dialog. |
| 32 }; |
| 33 $('privacyClearDataButton').onclick = function(event) { |
| 34 // TODO(csilv): spawn clear data overlay dialog. |
| 35 }; |
| 36 $('proxiesConfigureButton').onclick = function(event) { |
| 37 if (cr.isMac) { |
| 38 chrome.send('showNetworkProxySettings'); |
| 39 } else { |
| 40 // TODO(csilv): spawn network proxy settings sub-dialog. |
| 41 } |
| 42 }; |
| 43 $('downloadLocationBrowseButton').onclick = function(event) { |
| 44 // TODO(csilv): spawn OS native file prompt dialog. |
| 45 }; |
| 46 $('autoOpenFileTypesResetToDefault').onclick = function(event) { |
| 47 // TODO(csilv): do whatever this button must do...? |
| 48 }; |
| 49 $('fontSettingsConfigureFontsOnlyButton').onclick = function(event) { |
| 50 // TODO(csilv): spawn font settings sub-dialog. |
| 51 }; |
| 52 $('certificatesManageButton').onclick = function(event) { |
| 53 if (cr.isMac) { |
| 54 chrome.send('showManageSSLCertificates'); |
| 55 } else { |
| 56 // TODO(csilv): spawn manage SSL certs sub-dialog. |
| 57 } |
| 58 }; |
| 59 |
| 60 // Hide tabsToLinks checkbox on non-Mac platforms. |
| 61 if (!cr.isMac) { |
| 62 $('tabsToLinksCheckbox').style.display = 'none'; |
| 63 } |
| 64 }, |
| 65 }; |
| 66 |
OLD | NEW |