| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_ADVANCED_OPTIONS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_ADVANCED_OPTIONS_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_ADVANCED_OPTIONS_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_ADVANCED_OPTIONS_HANDLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/browser/prefs/pref_member.h" | 9 #include "chrome/browser/prefs/pref_member.h" |
| 10 #include "chrome/browser/printing/cloud_print/cloud_print_setup_handler.h" | 10 #include "chrome/browser/printing/cloud_print/cloud_print_setup_handler.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 const content::NotificationSource& source, | 39 const content::NotificationSource& source, |
| 40 const content::NotificationDetails& details); | 40 const content::NotificationDetails& details); |
| 41 | 41 |
| 42 // SelectFileDialog::Listener implementation | 42 // SelectFileDialog::Listener implementation |
| 43 virtual void FileSelected(const FilePath& path, int index, void* params); | 43 virtual void FileSelected(const FilePath& path, int index, void* params); |
| 44 | 44 |
| 45 // CloudPrintSetupHandler::Delegate implementation. | 45 // CloudPrintSetupHandler::Delegate implementation. |
| 46 virtual void OnCloudPrintSetupClosed(); | 46 virtual void OnCloudPrintSetupClosed(); |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 // Callback for the "selectDownloadLocation" message. This will prompt | 49 // Callback for the "selectDownloadLocation" message. This will prompt the |
| 50 // the user for a destination folder using platform-specific APIs. | 50 // user for a destination folder using platform-specific APIs. |
| 51 void HandleSelectDownloadLocation(const ListValue* args); | 51 void HandleSelectDownloadLocation(const ListValue* args); |
| 52 | 52 |
| 53 // Callback for the "autoOpenFileTypesResetToDefault" message. This will | 53 // Callback for the "autoOpenFileTypesResetToDefault" message. This will |
| 54 // remove all auto-open file-type settings. | 54 // remove all auto-open file-type settings. |
| 55 void HandleAutoOpenButton(const ListValue* args); | 55 void HandleAutoOpenButton(const ListValue* args); |
| 56 | 56 |
| 57 // Callback for the "metricsReportingCheckboxAction" message. This is called | 57 // Callback for the "metricsReportingCheckboxAction" message. This is called |
| 58 // if the user toggles the metrics reporting checkbox. | 58 // if the user toggles the metrics reporting checkbox. |
| 59 void HandleMetricsReportingCheckbox(const ListValue* args); | 59 void HandleMetricsReportingCheckbox(const ListValue* args); |
| 60 | 60 |
| 61 // Callback for the "defaultFontSizeAction" message. This is called if the | 61 // Callback for the "defaultFontSizeAction" message. This is called if the |
| 62 // user changes the default font size. |args| is an array that contains | 62 // user changes the default font size. |args| is an array that contains |
| 63 // one item, the font size as a numeric value. | 63 // one item, the font size as a numeric value. |
| 64 void HandleDefaultFontSize(const ListValue* args); | 64 void HandleDefaultFontSize(const ListValue* args); |
| 65 | 65 |
| 66 // Callback for the "defaultZoomFactorAction" message. This is called if the |
| 67 // user changes the default zoom factor. |args| is an array that contains |
| 68 // one item, the zoom factor as a numeric value. |
| 69 void HandleDefaultZoomFactor(const ListValue* args); |
| 70 |
| 66 // Callback for the "Check for server certificate revocation" checkbox. This | 71 // Callback for the "Check for server certificate revocation" checkbox. This |
| 67 // is called if the user toggles the "Check for server certificate revocation" | 72 // is called if the user toggles the "Check for server certificate revocation" |
| 68 // checkbox. | 73 // checkbox. |
| 69 void HandleCheckRevocationCheckbox(const ListValue* args); | 74 void HandleCheckRevocationCheckbox(const ListValue* args); |
| 70 | 75 |
| 71 // Callback for the "Use SSL 3.0" checkbox. This is called if the user toggles | 76 // Callback for the "Use SSL 3.0" checkbox. This is called if the user toggles |
| 72 // the "Use SSL 3.0" checkbox. | 77 // the "Use SSL 3.0" checkbox. |
| 73 void HandleUseSSL3Checkbox(const ListValue* args); | 78 void HandleUseSSL3Checkbox(const ListValue* args); |
| 74 | 79 |
| 75 // Callback for the "Use TLS 1.0" checkbox. This is called if the user toggles | 80 // Callback for the "Use TLS 1.0" checkbox. This is called if the user toggles |
| 76 // the "Use TLS 1.0" checkbox. | 81 // the "Use TLS 1.0" checkbox. |
| 77 void HandleUseTLS1Checkbox(const ListValue* args); | 82 void HandleUseTLS1Checkbox(const ListValue* args); |
| 78 | 83 |
| 79 #if !defined(OS_CHROMEOS) | 84 #if !defined(OS_CHROMEOS) |
| 80 // Callback for the "showNetworkProxySettings" message. This will invoke | 85 // Callback for the "showNetworkProxySettings" message. This will invoke |
| 81 // an appropriate dialog for configuring proxy settings. | 86 // an appropriate dialog for configuring proxy settings. |
| 82 void ShowNetworkProxySettings(const ListValue* args); | 87 void ShowNetworkProxySettings(const ListValue* args); |
| 83 #endif | 88 #endif |
| 84 | 89 |
| 85 #if !defined(USE_NSS) | 90 #if !defined(USE_NSS) |
| 86 // Callback for the "showManageSSLCertificates" message. This will invoke | 91 // Callback for the "showManageSSLCertificates" message. This will invoke |
| 87 // an appropriate certificate management action based on the platform. | 92 // an appropriate certificate management action based on the platform. |
| 88 void ShowManageSSLCertificates(const ListValue* args); | 93 void ShowManageSSLCertificates(const ListValue* args); |
| 89 #endif | 94 #endif |
| 90 | 95 |
| 91 // Callback for the Cloud Print manage button. This will open a new | 96 // Callback for the Cloud Print manage button. This will open a new |
| 92 // tab pointed at the management URL. | 97 // tab pointed at the management URL. |
| 93 void ShowCloudPrintManagePage(const ListValue* args); | 98 void ShowCloudPrintManagePage(const ListValue* args); |
| 94 | 99 |
| 95 #if !defined(OS_CHROMEOS) | 100 #if !defined(OS_CHROMEOS) |
| 96 // Callback for the Sign in to Cloud Print button. This will start | 101 // Callback for the Sign in to Cloud Print button. This will start |
| 97 // the authentication process. | 102 // the authentication process. |
| 98 void ShowCloudPrintSetupDialog(const ListValue* args); | 103 void ShowCloudPrintSetupDialog(const ListValue* args); |
| 99 | 104 |
| 100 // Callback for the Disable Cloud Print button. This will sign out | 105 // Callback for the Disable Cloud Print button. This will sign out |
| 101 // of cloud print. | 106 // of cloud print. |
| 102 void HandleDisableCloudPrintProxy(const ListValue* args); | 107 void HandleDisableCloudPrintProxy(const ListValue* args); |
| 103 | 108 |
| 104 // Pings the service to send us it's current notion of the enabled state. | 109 // Pings the service to send us it's current notion of the enabled state. |
| 105 void RefreshCloudPrintStatusFromService(); | 110 void RefreshCloudPrintStatusFromService(); |
| 106 | 111 |
| 107 // Setup the enabled or disabled state of the cloud print proxy | 112 // Setup the enabled or disabled state of the cloud print proxy |
| 108 // management UI. | 113 // management UI. |
| 109 void SetupCloudPrintProxySection(); | 114 void SetupCloudPrintProxySection(); |
| 110 | 115 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 122 // Callback for the "Continue running background apps..." checkbox. | 127 // Callback for the "Continue running background apps..." checkbox. |
| 123 void HandleBackgroundModeCheckbox(const ListValue* args); | 128 void HandleBackgroundModeCheckbox(const ListValue* args); |
| 124 #endif | 129 #endif |
| 125 | 130 |
| 126 // Setup the checked state for the metrics reporting checkbox. | 131 // Setup the checked state for the metrics reporting checkbox. |
| 127 void SetupMetricsReportingCheckbox(); | 132 void SetupMetricsReportingCheckbox(); |
| 128 | 133 |
| 129 // Setup the visibility for the metrics reporting setting. | 134 // Setup the visibility for the metrics reporting setting. |
| 130 void SetupMetricsReportingSettingVisibility(); | 135 void SetupMetricsReportingSettingVisibility(); |
| 131 | 136 |
| 132 void SetupFontSizeLabel(); | 137 // Setup the font size selector control. |
| 138 void SetupFontSizeSelector(); |
| 139 |
| 140 // Setup the page zoom selector control. |
| 141 void SetupPageZoomSelector(); |
| 133 | 142 |
| 134 // Setup the enabled state of the reset button. | 143 // Setup the enabled state of the reset button. |
| 135 void SetupAutoOpenFileTypesDisabledAttribute(); | 144 void SetupAutoOpenFileTypesDisabledAttribute(); |
| 136 | 145 |
| 137 // Setup the proxy settings section UI. | 146 // Setup the proxy settings section UI. |
| 138 void SetupProxySettingsSection(); | 147 void SetupProxySettingsSection(); |
| 139 | 148 |
| 140 // Setup the checked state for SSL related checkboxes. | 149 // Setup the checked state for SSL related checkboxes. |
| 141 void SetupSSLConfigSettings(); | 150 void SetupSSLConfigSettings(); |
| 142 | 151 |
| 143 scoped_refptr<SelectFileDialog> select_folder_dialog_; | 152 scoped_refptr<SelectFileDialog> select_folder_dialog_; |
| 144 | 153 |
| 145 #if !defined(OS_CHROMEOS) | 154 #if !defined(OS_CHROMEOS) |
| 146 BooleanPrefMember enable_metrics_recording_; | 155 BooleanPrefMember enable_metrics_recording_; |
| 147 StringPrefMember cloud_print_proxy_email_; | 156 StringPrefMember cloud_print_proxy_email_; |
| 148 BooleanPrefMember cloud_print_proxy_enabled_; | 157 BooleanPrefMember cloud_print_proxy_enabled_; |
| 149 bool cloud_print_proxy_ui_enabled_; | 158 bool cloud_print_proxy_ui_enabled_; |
| 150 scoped_ptr<CloudPrintSetupHandler> cloud_print_setup_handler_; | 159 scoped_ptr<CloudPrintSetupHandler> cloud_print_setup_handler_; |
| 151 #endif | 160 #endif |
| 152 | 161 |
| 153 // SSLConfigService prefs. | 162 // SSLConfigService prefs. |
| 154 BooleanPrefMember rev_checking_enabled_; | 163 BooleanPrefMember rev_checking_enabled_; |
| 155 | 164 |
| 156 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) | 165 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) |
| 157 BooleanPrefMember background_mode_enabled_; | 166 BooleanPrefMember background_mode_enabled_; |
| 158 #endif | 167 #endif |
| 159 | 168 |
| 160 StringPrefMember auto_open_files_; | 169 StringPrefMember auto_open_files_; |
| 161 IntegerPrefMember default_font_size_; | 170 IntegerPrefMember default_font_size_; |
| 171 DoublePrefMember default_zoom_level_; |
| 162 | 172 |
| 163 #if !defined(OS_CHROMEOS) | 173 #if !defined(OS_CHROMEOS) |
| 164 scoped_ptr<PrefSetObserver> proxy_prefs_; | 174 scoped_ptr<PrefSetObserver> proxy_prefs_; |
| 165 #endif // !defined(OS_CHROMEOS) | 175 #endif // !defined(OS_CHROMEOS) |
| 166 | 176 |
| 167 DISALLOW_COPY_AND_ASSIGN(AdvancedOptionsHandler); | 177 DISALLOW_COPY_AND_ASSIGN(AdvancedOptionsHandler); |
| 168 }; | 178 }; |
| 169 | 179 |
| 170 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_ADVANCED_OPTIONS_HANDLER_H_ | 180 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_ADVANCED_OPTIONS_HANDLER_H_ |
| OLD | NEW |