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

Side by Side Diff: chrome/browser/ui/webui/options2/advanced_options_handler2.h

Issue 9560005: [uber page] Merge advanced options page into browser options. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Rebase again. Created 8 years, 9 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS2_ADVANCED_OPTIONS_HANDLER2_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS2_ADVANCED_OPTIONS_HANDLER2_H_
7 #pragma once
8
9 #include "chrome/browser/prefs/pref_member.h"
10 #include "chrome/browser/printing/cloud_print/cloud_print_setup_handler.h"
11 #include "chrome/browser/ui/select_file_dialog.h"
12 #include "chrome/browser/ui/webui/options2/options_ui2.h"
13
14 #if !defined(OS_CHROMEOS)
15 #include "chrome/browser/prefs/pref_set_observer.h"
16 #endif // !defined(OS_CHROMEOS)
17
18 class CloudPrintSetupHandler;
19
20 namespace options2 {
21
22 // Chrome advanced options page UI handler.
23 class AdvancedOptionsHandler
24 : public OptionsPageUIHandler,
25 public SelectFileDialog::Listener,
26 public CloudPrintSetupHandlerDelegate {
27 public:
28 AdvancedOptionsHandler();
29 virtual ~AdvancedOptionsHandler();
30
31 // OptionsPageUIHandler implementation.
32 virtual void GetLocalizedValues(DictionaryValue* localized_strings) OVERRIDE;
33 virtual void Initialize() OVERRIDE;
34
35 // WebUIMessageHandler implementation.
36 virtual void RegisterMessages() OVERRIDE;
37
38 // content::NotificationObserver implementation.
39 virtual void Observe(int type,
40 const content::NotificationSource& source,
41 const content::NotificationDetails& details) OVERRIDE;
42
43 // SelectFileDialog::Listener implementation
44 virtual void FileSelected(const FilePath& path,
45 int index,
46 void* params) OVERRIDE;
47
48 // CloudPrintSetupHandler::Delegate implementation.
49 virtual void OnCloudPrintSetupClosed() OVERRIDE;
50
51 private:
52 // Callback for the "selectDownloadLocation" message. This will prompt the
53 // user for a destination folder using platform-specific APIs.
54 void HandleSelectDownloadLocation(const ListValue* args);
55
56 // Callback for the "autoOpenFileTypesResetToDefault" message. This will
57 // remove all auto-open file-type settings.
58 void HandleAutoOpenButton(const ListValue* args);
59
60 // Callback for the "metricsReportingCheckboxAction" message. This is called
61 // if the user toggles the metrics reporting checkbox.
62 void HandleMetricsReportingCheckbox(const ListValue* args);
63
64 // Callback for the "defaultFontSizeAction" message. This is called if the
65 // user changes the default font size. |args| is an array that contains
66 // one item, the font size as a numeric value.
67 void HandleDefaultFontSize(const ListValue* args);
68
69 // Callback for the "defaultZoomFactorAction" message. This is called if the
70 // user changes the default zoom factor. |args| is an array that contains
71 // one item, the zoom factor as a numeric value.
72 void HandleDefaultZoomFactor(const ListValue* args);
73
74 // Callback for the "Check for server certificate revocation" checkbox. This
75 // is called if the user toggles the "Check for server certificate revocation"
76 // checkbox.
77 void HandleCheckRevocationCheckbox(const ListValue* args);
78
79 // Callback for the "Use SSL 3.0" checkbox. This is called if the user toggles
80 // the "Use SSL 3.0" checkbox.
81 void HandleUseSSL3Checkbox(const ListValue* args);
82
83 // Callback for the "Use TLS 1.0" checkbox. This is called if the user toggles
84 // the "Use TLS 1.0" checkbox.
85 void HandleUseTLS1Checkbox(const ListValue* args);
86
87 #if !defined(OS_CHROMEOS)
88 // Callback for the "showNetworkProxySettings" message. This will invoke
89 // an appropriate dialog for configuring proxy settings.
90 void ShowNetworkProxySettings(const ListValue* args);
91 #endif
92
93 #if !defined(USE_NSS)
94 // Callback for the "showManageSSLCertificates" message. This will invoke
95 // an appropriate certificate management action based on the platform.
96 void ShowManageSSLCertificates(const ListValue* args);
97 #endif
98
99 // Callback for the Cloud Print manage button. This will open a new
100 // tab pointed at the management URL.
101 void ShowCloudPrintManagePage(const ListValue* args);
102
103 // Register localized strings used by Cloud Print
104 void RegisterCloudPrintStrings(DictionaryValue* localized_strings);
105
106 #if !defined(OS_CHROMEOS)
107 // Callback for the Sign in to Cloud Print button. This will start
108 // the authentication process.
109 void ShowCloudPrintSetupDialog(const ListValue* args);
110
111 // Callback for the Disable Cloud Print button. This will sign out
112 // of cloud print.
113 void HandleDisableCloudPrintConnector(const ListValue* args);
114
115 // Pings the service to send us it's current notion of the enabled state.
116 void RefreshCloudPrintStatusFromService();
117
118 // Setup the enabled or disabled state of the cloud print connector
119 // management UI.
120 void SetupCloudPrintConnectorSection();
121
122 // Remove cloud print connector section if cloud print connector management
123 // UI is disabled.
124 void RemoveCloudPrintConnectorSection();
125 #endif
126
127 #if defined(OS_CHROMEOS)
128 // Called when the accessibility checkbox values are changed.
129 // |args| will contain the checkbox checked state as a string
130 // ("true" or "false").
131 void SpokenFeedbackChangeCallback(const base::ListValue* args);
132 void HighContrastChangeCallback(const base::ListValue* args);
133 void ScreenMagnifierChangeCallback(const base::ListValue* args);
134 void VirtualKeyboardChangeCallback(const base::ListValue* args);
135 #endif
136
137 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS)
138 // Sets up the checked state for the "Continue running background apps..."
139 // checkbox.
140 void SetupBackgroundModeSettings();
141
142 // Callback for the "Continue running background apps..." checkbox.
143 void HandleBackgroundModeCheckbox(const ListValue* args);
144 #endif
145
146 // Setup the checked state for the metrics reporting checkbox.
147 void SetupMetricsReportingCheckbox();
148
149 // Setup the visibility for the metrics reporting setting.
150 void SetupMetricsReportingSettingVisibility();
151
152 // Setup the font size selector control.
153 void SetupFontSizeSelector();
154
155 // Setup the page zoom selector control.
156 void SetupPageZoomSelector();
157
158 // Setup the enabled state of the reset button.
159 void SetupAutoOpenFileTypesDisabledAttribute();
160
161 // Setup the proxy settings section UI.
162 void SetupProxySettingsSection();
163
164 // Setup the checked state for SSL related checkboxes.
165 void SetupSSLConfigSettings();
166
167 #if defined(OS_CHROMEOS)
168 // Setup the accessibility features for ChromeOS.
169 void SetupAccessibilityFeatures();
170 #endif
171
172 scoped_refptr<SelectFileDialog> select_folder_dialog_;
173
174 #if !defined(OS_CHROMEOS)
175 BooleanPrefMember enable_metrics_recording_;
176 StringPrefMember cloud_print_connector_email_;
177 BooleanPrefMember cloud_print_connector_enabled_;
178 bool cloud_print_connector_ui_enabled_;
179 scoped_ptr<CloudPrintSetupHandler> cloud_print_setup_handler_;
180 #endif
181
182 // SSLConfigService prefs.
183 BooleanPrefMember rev_checking_enabled_;
184
185 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS)
186 BooleanPrefMember background_mode_enabled_;
187 #endif
188
189 StringPrefMember auto_open_files_;
190 IntegerPrefMember default_font_size_;
191 DoublePrefMember default_zoom_level_;
192
193 #if !defined(OS_CHROMEOS)
194 scoped_ptr<PrefSetObserver> proxy_prefs_;
195 #endif // !defined(OS_CHROMEOS)
196
197 DISALLOW_COPY_AND_ASSIGN(AdvancedOptionsHandler);
198 };
199
200 } // namespace options2
201
202 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_ADVANCED_OPTIONS_HANDLER2_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698