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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "chrome/browser/ui/webui/options/options_ui.h" | 22 #include "chrome/browser/ui/webui/options/options_ui.h" |
23 #include "components/search_engines/template_url_service_observer.h" | 23 #include "components/search_engines/template_url_service_observer.h" |
24 #include "components/signin/core/browser/signin_manager_base.h" | 24 #include "components/signin/core/browser/signin_manager_base.h" |
25 #include "content/public/browser/notification_observer.h" | 25 #include "content/public/browser/notification_observer.h" |
26 #include "extensions/browser/extension_registry_observer.h" | 26 #include "extensions/browser/extension_registry_observer.h" |
27 #include "google_apis/gaia/google_service_auth_error.h" | 27 #include "google_apis/gaia/google_service_auth_error.h" |
28 #include "ui/base/models/table_model_observer.h" | 28 #include "ui/base/models/table_model_observer.h" |
29 #include "ui/shell_dialogs/select_file_dialog.h" | 29 #include "ui/shell_dialogs/select_file_dialog.h" |
30 | 30 |
31 #if defined(OS_CHROMEOS) | 31 #if defined(OS_CHROMEOS) |
| 32 #include "chrome/browser/chromeos/policy/consumer_management_service.h" |
32 #include "chrome/browser/chromeos/system/pointer_device_observer.h" | 33 #include "chrome/browser/chromeos/system/pointer_device_observer.h" |
33 #endif // defined(OS_CHROMEOS) | 34 #endif // defined(OS_CHROMEOS) |
34 | 35 |
35 class AutocompleteController; | 36 class AutocompleteController; |
36 class CloudPrintSetupHandler; | 37 class CloudPrintSetupHandler; |
37 class CustomHomePagesTableModel; | 38 class CustomHomePagesTableModel; |
38 class TemplateURLService; | 39 class TemplateURLService; |
39 | 40 |
40 namespace base { | 41 namespace base { |
41 class Value; | 42 class Value; |
42 } | 43 } |
43 | 44 |
44 namespace policy { | 45 namespace policy { |
45 class PolicyChangeRegistrar; | 46 class PolicyChangeRegistrar; |
46 } | 47 } |
47 | 48 |
48 namespace options { | 49 namespace options { |
49 | 50 |
50 // Chrome browser options page UI handler. | 51 // Chrome browser options page UI handler. |
51 class BrowserOptionsHandler | 52 class BrowserOptionsHandler |
52 : public OptionsPageUIHandler, | 53 : public OptionsPageUIHandler, |
53 public ProfileSyncServiceObserver, | 54 public ProfileSyncServiceObserver, |
54 public SigninManagerBase::Observer, | 55 public SigninManagerBase::Observer, |
55 public ui::SelectFileDialog::Listener, | 56 public ui::SelectFileDialog::Listener, |
56 public ShellIntegration::DefaultWebClientObserver, | 57 public ShellIntegration::DefaultWebClientObserver, |
57 #if defined(OS_CHROMEOS) | 58 #if defined(OS_CHROMEOS) |
58 public chromeos::system::PointerDeviceObserver::Observer, | 59 public chromeos::system::PointerDeviceObserver::Observer, |
| 60 public policy::ConsumerManagementService::Observer, |
59 #endif | 61 #endif |
60 public TemplateURLServiceObserver, | 62 public TemplateURLServiceObserver, |
61 public extensions::ExtensionRegistryObserver, | 63 public extensions::ExtensionRegistryObserver, |
62 public content::NotificationObserver { | 64 public content::NotificationObserver { |
63 public: | 65 public: |
64 BrowserOptionsHandler(); | 66 BrowserOptionsHandler(); |
65 virtual ~BrowserOptionsHandler(); | 67 virtual ~BrowserOptionsHandler(); |
66 | 68 |
67 // OptionsPageUIHandler implementation. | 69 // OptionsPageUIHandler implementation. |
68 virtual void GetLocalizedValues(base::DictionaryValue* values) OVERRIDE; | 70 virtual void GetLocalizedValues(base::DictionaryValue* values) OVERRIDE; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 // Will be called when the policy::key::kUserAvatarImage policy changes. | 122 // Will be called when the policy::key::kUserAvatarImage policy changes. |
121 void OnUserImagePolicyChanged(const base::Value* previous_policy, | 123 void OnUserImagePolicyChanged(const base::Value* previous_policy, |
122 const base::Value* current_policy); | 124 const base::Value* current_policy); |
123 | 125 |
124 // Will be called when the policy::key::kWallpaperImage policy changes. | 126 // Will be called when the policy::key::kWallpaperImage policy changes. |
125 void OnWallpaperPolicyChanged(const base::Value* previous_policy, | 127 void OnWallpaperPolicyChanged(const base::Value* previous_policy, |
126 const base::Value* current_policy); | 128 const base::Value* current_policy); |
127 | 129 |
128 // Will be called when powerwash dialog is shown. | 130 // Will be called when powerwash dialog is shown. |
129 void OnPowerwashDialogShow(const base::ListValue* args); | 131 void OnPowerwashDialogShow(const base::ListValue* args); |
| 132 |
| 133 // ConsumerManagementService::Observer: |
| 134 void OnConsumerManagementStatusChanged( |
| 135 policy::ConsumerManagementService::Status status); |
130 #endif | 136 #endif |
131 | 137 |
132 void UpdateSyncState(); | 138 void UpdateSyncState(); |
133 | 139 |
134 // Will be called when the kSigninAllowed pref has changed. | 140 // Will be called when the kSigninAllowed pref has changed. |
135 void OnSigninAllowedPrefChange(); | 141 void OnSigninAllowedPrefChange(); |
136 | 142 |
137 // Makes this the default browser. Called from WebUI. | 143 // Makes this the default browser. Called from WebUI. |
138 void BecomeDefaultBrowser(const base::ListValue* args); | 144 void BecomeDefaultBrowser(const base::ListValue* args); |
139 | 145 |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 | 366 |
361 // Used to get WeakPtr to self for use on the UI thread. | 367 // Used to get WeakPtr to self for use on the UI thread. |
362 base::WeakPtrFactory<BrowserOptionsHandler> weak_ptr_factory_; | 368 base::WeakPtrFactory<BrowserOptionsHandler> weak_ptr_factory_; |
363 | 369 |
364 DISALLOW_COPY_AND_ASSIGN(BrowserOptionsHandler); | 370 DISALLOW_COPY_AND_ASSIGN(BrowserOptionsHandler); |
365 }; | 371 }; |
366 | 372 |
367 } // namespace options | 373 } // namespace options |
368 | 374 |
369 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_ | 375 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_ |
OLD | NEW |