OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_OPTIONS2_BROWSER_OPTIONS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS2_BROWSER_OPTIONS_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS2_BROWSER_OPTIONS_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS2_BROWSER_OPTIONS_HANDLER_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
11 #include "chrome/browser/prefs/pref_member.h" | 11 #include "chrome/browser/prefs/pref_member.h" |
12 #include "chrome/browser/printing/cloud_print/cloud_print_setup_handler.h" | 12 #include "chrome/browser/printing/cloud_print/cloud_print_setup_handler.h" |
13 #include "chrome/browser/search_engines/template_url_service_observer.h" | 13 #include "chrome/browser/search_engines/template_url_service_observer.h" |
14 #include "chrome/browser/shell_integration.h" | 14 #include "chrome/browser/shell_integration.h" |
15 #include "chrome/browser/sync/profile_sync_service_observer.h" | 15 #include "chrome/browser/sync/profile_sync_service_observer.h" |
16 #include "chrome/browser/ui/select_file_dialog.h" | |
17 #include "chrome/browser/ui/webui/options2/options_ui.h" | 16 #include "chrome/browser/ui/webui/options2/options_ui.h" |
| 17 #include "ui/base/dialogs/select_file_dialog.h" |
18 #include "ui/base/models/table_model_observer.h" | 18 #include "ui/base/models/table_model_observer.h" |
19 | 19 |
20 #if defined(OS_CHROMEOS) | 20 #if defined(OS_CHROMEOS) |
21 #include "chrome/browser/chromeos/system/pointer_device_observer.h" | 21 #include "chrome/browser/chromeos/system/pointer_device_observer.h" |
22 #else | 22 #else |
23 #include "chrome/browser/prefs/pref_set_observer.h" | 23 #include "chrome/browser/prefs/pref_set_observer.h" |
24 #endif // defined(OS_CHROMEOS) | 24 #endif // defined(OS_CHROMEOS) |
25 | 25 |
26 class AutocompleteController; | 26 class AutocompleteController; |
27 class CloudPrintSetupHandler; | 27 class CloudPrintSetupHandler; |
28 class CustomHomePagesTableModel; | 28 class CustomHomePagesTableModel; |
29 class TemplateURLService; | 29 class TemplateURLService; |
30 | 30 |
31 namespace options2 { | 31 namespace options2 { |
32 | 32 |
33 // Chrome browser options page UI handler. | 33 // Chrome browser options page UI handler. |
34 class BrowserOptionsHandler | 34 class BrowserOptionsHandler |
35 : public OptionsPageUIHandler, | 35 : public OptionsPageUIHandler, |
36 public CloudPrintSetupHandlerDelegate, | 36 public CloudPrintSetupHandlerDelegate, |
37 public ProfileSyncServiceObserver, | 37 public ProfileSyncServiceObserver, |
38 public SelectFileDialog::Listener, | 38 public ui::SelectFileDialog::Listener, |
39 public ShellIntegration::DefaultWebClientObserver, | 39 public ShellIntegration::DefaultWebClientObserver, |
40 #if defined(OS_CHROMEOS) | 40 #if defined(OS_CHROMEOS) |
41 public chromeos::system::PointerDeviceObserver::Observer, | 41 public chromeos::system::PointerDeviceObserver::Observer, |
42 #endif | 42 #endif |
43 public TemplateURLServiceObserver { | 43 public TemplateURLServiceObserver { |
44 public: | 44 public: |
45 BrowserOptionsHandler(); | 45 BrowserOptionsHandler(); |
46 virtual ~BrowserOptionsHandler(); | 46 virtual ~BrowserOptionsHandler(); |
47 | 47 |
48 // OptionsPageUIHandler implementation. | 48 // OptionsPageUIHandler implementation. |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 TemplateURLService* template_url_service_; // Weak. | 290 TemplateURLService* template_url_service_; // Weak. |
291 | 291 |
292 // Used to get |weak_ptr_| to self for use on the File thread. | 292 // Used to get |weak_ptr_| to self for use on the File thread. |
293 base::WeakPtrFactory<BrowserOptionsHandler> weak_ptr_factory_for_file_; | 293 base::WeakPtrFactory<BrowserOptionsHandler> weak_ptr_factory_for_file_; |
294 // Used to post update tasks to the UI thread. | 294 // Used to post update tasks to the UI thread. |
295 base::WeakPtrFactory<BrowserOptionsHandler> weak_ptr_factory_for_ui_; | 295 base::WeakPtrFactory<BrowserOptionsHandler> weak_ptr_factory_for_ui_; |
296 | 296 |
297 // True if the multiprofiles switch is enabled. | 297 // True if the multiprofiles switch is enabled. |
298 bool multiprofile_; | 298 bool multiprofile_; |
299 | 299 |
300 scoped_refptr<SelectFileDialog> select_folder_dialog_; | 300 scoped_refptr<ui::SelectFileDialog> select_folder_dialog_; |
301 | 301 |
302 #if !defined(OS_CHROMEOS) | 302 #if !defined(OS_CHROMEOS) |
303 BooleanPrefMember enable_metrics_recording_; | 303 BooleanPrefMember enable_metrics_recording_; |
304 StringPrefMember cloud_print_connector_email_; | 304 StringPrefMember cloud_print_connector_email_; |
305 BooleanPrefMember cloud_print_connector_enabled_; | 305 BooleanPrefMember cloud_print_connector_enabled_; |
306 bool cloud_print_connector_ui_enabled_; | 306 bool cloud_print_connector_ui_enabled_; |
307 scoped_ptr<CloudPrintSetupHandler> cloud_print_setup_handler_; | 307 scoped_ptr<CloudPrintSetupHandler> cloud_print_setup_handler_; |
308 #endif | 308 #endif |
309 | 309 |
310 // SSLConfigService prefs. | 310 // SSLConfigService prefs. |
(...skipping 10 matching lines...) Expand all Loading... |
321 #if !defined(OS_CHROMEOS) | 321 #if !defined(OS_CHROMEOS) |
322 scoped_ptr<PrefSetObserver> proxy_prefs_; | 322 scoped_ptr<PrefSetObserver> proxy_prefs_; |
323 #endif // !defined(OS_CHROMEOS) | 323 #endif // !defined(OS_CHROMEOS) |
324 | 324 |
325 DISALLOW_COPY_AND_ASSIGN(BrowserOptionsHandler); | 325 DISALLOW_COPY_AND_ASSIGN(BrowserOptionsHandler); |
326 }; | 326 }; |
327 | 327 |
328 } // namespace options2 | 328 } // namespace options2 |
329 | 329 |
330 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_BROWSER_OPTIONS_HANDLER_H_ | 330 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_BROWSER_OPTIONS_HANDLER_H_ |
OLD | NEW |