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