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_OPTIONS_BROWSER_OPTIONS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_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 "base/prefs/public/pref_member.h" | 11 #include "base/prefs/public/pref_member.h" |
12 #include "chrome/browser/api/sync/profile_sync_service_observer.h" | 12 #include "chrome/browser/api/sync/profile_sync_service_observer.h" |
13 #include "chrome/browser/printing/cloud_print/cloud_print_setup_handler.h" | 13 #include "chrome/browser/printing/cloud_print/cloud_print_setup_handler.h" |
14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/browser/search_engines/template_url_service_observer.h" | 15 #include "chrome/browser/search_engines/template_url_service_observer.h" |
16 #include "chrome/browser/shell_integration.h" | 16 #include "chrome/browser/shell_integration.h" |
| 17 #include "chrome/browser/signin/signin_pref_observer.h" |
17 #include "chrome/browser/ui/webui/options/options_ui.h" | 18 #include "chrome/browser/ui/webui/options/options_ui.h" |
18 #include "ui/base/models/table_model_observer.h" | 19 #include "ui/base/models/table_model_observer.h" |
19 #include "ui/shell_dialogs/select_file_dialog.h" | 20 #include "ui/shell_dialogs/select_file_dialog.h" |
20 | 21 |
21 #if defined(OS_CHROMEOS) | 22 #if defined(OS_CHROMEOS) |
22 #include "chrome/browser/chromeos/system/pointer_device_observer.h" | 23 #include "chrome/browser/chromeos/system/pointer_device_observer.h" |
23 #else | 24 #else |
24 #include "base/prefs/public/pref_change_registrar.h" | 25 #include "base/prefs/public/pref_change_registrar.h" |
25 #endif // defined(OS_CHROMEOS) | 26 #endif // defined(OS_CHROMEOS) |
26 | 27 |
27 class AutocompleteController; | 28 class AutocompleteController; |
28 class CloudPrintSetupHandler; | 29 class CloudPrintSetupHandler; |
29 class CustomHomePagesTableModel; | 30 class CustomHomePagesTableModel; |
30 class TemplateURLService; | 31 class TemplateURLService; |
31 | 32 |
32 namespace options { | 33 namespace options { |
33 | 34 |
34 // Chrome browser options page UI handler. | 35 // Chrome browser options page UI handler. |
35 class BrowserOptionsHandler | 36 class BrowserOptionsHandler |
36 : public OptionsPageUIHandler, | 37 : public OptionsPageUIHandler, |
37 public CloudPrintSetupHandlerDelegate, | 38 public CloudPrintSetupHandlerDelegate, |
38 public ProfileSyncServiceObserver, | 39 public ProfileSyncServiceObserver, |
| 40 public SigninPrefObserver, |
39 public ui::SelectFileDialog::Listener, | 41 public ui::SelectFileDialog::Listener, |
40 public ShellIntegration::DefaultWebClientObserver, | 42 public ShellIntegration::DefaultWebClientObserver, |
41 #if defined(OS_CHROMEOS) | 43 #if defined(OS_CHROMEOS) |
42 public chromeos::system::PointerDeviceObserver::Observer, | 44 public chromeos::system::PointerDeviceObserver::Observer, |
43 #endif | 45 #endif |
44 public TemplateURLServiceObserver { | 46 public TemplateURLServiceObserver { |
45 public: | 47 public: |
46 BrowserOptionsHandler(); | 48 BrowserOptionsHandler(); |
47 virtual ~BrowserOptionsHandler(); | 49 virtual ~BrowserOptionsHandler(); |
48 | 50 |
49 // OptionsPageUIHandler implementation. | 51 // OptionsPageUIHandler implementation. |
50 virtual void GetLocalizedValues(DictionaryValue* values) OVERRIDE; | 52 virtual void GetLocalizedValues(DictionaryValue* values) OVERRIDE; |
51 virtual void PageLoadStarted() OVERRIDE; | 53 virtual void PageLoadStarted() OVERRIDE; |
52 virtual void InitializeHandler() OVERRIDE; | 54 virtual void InitializeHandler() OVERRIDE; |
53 virtual void InitializePage() OVERRIDE; | 55 virtual void InitializePage() OVERRIDE; |
54 virtual void RegisterMessages() OVERRIDE; | 56 virtual void RegisterMessages() OVERRIDE; |
55 | 57 |
56 // ProfileSyncServiceObserver implementation. | 58 // ProfileSyncServiceObserver implementation. |
57 virtual void OnStateChanged() OVERRIDE; | 59 virtual void OnStateChanged() OVERRIDE; |
58 | 60 |
| 61 // SigninPrefObserver implementation. |
| 62 virtual void OnSigninAllowedPrefChange(bool signin_allowed) OVERRIDE; |
| 63 |
59 // ShellIntegration::DefaultWebClientObserver implementation. | 64 // ShellIntegration::DefaultWebClientObserver implementation. |
60 virtual void SetDefaultWebClientUIState( | 65 virtual void SetDefaultWebClientUIState( |
61 ShellIntegration::DefaultWebClientUIState state) OVERRIDE; | 66 ShellIntegration::DefaultWebClientUIState state) OVERRIDE; |
62 virtual bool IsInteractiveSetDefaultPermitted() OVERRIDE; | 67 virtual bool IsInteractiveSetDefaultPermitted() OVERRIDE; |
63 | 68 |
64 // TemplateURLServiceObserver implementation. | 69 // TemplateURLServiceObserver implementation. |
65 virtual void OnTemplateURLServiceChanged() OVERRIDE; | 70 virtual void OnTemplateURLServiceChanged() OVERRIDE; |
66 | 71 |
67 // Create a Windows' profile specific desktop shortcut. | 72 // Create a Windows' profile specific desktop shortcut. |
68 static void CreateDesktopShortcutForProfile( | 73 static void CreateDesktopShortcutForProfile( |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 #if !defined(OS_CHROMEOS) | 296 #if !defined(OS_CHROMEOS) |
292 PrefChangeRegistrar proxy_prefs_; | 297 PrefChangeRegistrar proxy_prefs_; |
293 #endif // !defined(OS_CHROMEOS) | 298 #endif // !defined(OS_CHROMEOS) |
294 | 299 |
295 DISALLOW_COPY_AND_ASSIGN(BrowserOptionsHandler); | 300 DISALLOW_COPY_AND_ASSIGN(BrowserOptionsHandler); |
296 }; | 301 }; |
297 | 302 |
298 } // namespace options | 303 } // namespace options |
299 | 304 |
300 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_ | 305 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_ |
OLD | NEW |