| 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 <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 #include "content/public/browser/notification_observer.h" | 30 #include "content/public/browser/notification_observer.h" |
| 31 #include "extensions/browser/extension_registry_observer.h" | 31 #include "extensions/browser/extension_registry_observer.h" |
| 32 #include "google_apis/gaia/google_service_auth_error.h" | 32 #include "google_apis/gaia/google_service_auth_error.h" |
| 33 #include "printing/features/features.h" | 33 #include "printing/features/features.h" |
| 34 #include "ui/base/models/table_model_observer.h" | 34 #include "ui/base/models/table_model_observer.h" |
| 35 #include "ui/shell_dialogs/select_file_dialog.h" | 35 #include "ui/shell_dialogs/select_file_dialog.h" |
| 36 | 36 |
| 37 #if defined(OS_CHROMEOS) | 37 #if defined(OS_CHROMEOS) |
| 38 #include "chrome/browser/chromeos/system/pointer_device_observer.h" | 38 #include "chrome/browser/chromeos/system/pointer_device_observer.h" |
| 39 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" | 39 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" |
| 40 #include "components/user_manager/user_manager.h" |
| 40 #else // defined(OS_CHROMEOS) | 41 #else // defined(OS_CHROMEOS) |
| 41 #include "chrome/browser/shell_integration.h" | 42 #include "chrome/browser/shell_integration.h" |
| 42 #endif // !defined(OS_CHROMEOS) | 43 #endif // !defined(OS_CHROMEOS) |
| 43 | 44 |
| 44 class TemplateURLService; | 45 class TemplateURLService; |
| 45 | 46 |
| 46 namespace base { | 47 namespace base { |
| 47 class Value; | 48 class Value; |
| 48 } | 49 } |
| 49 | 50 |
| 50 namespace policy { | 51 namespace policy { |
| 51 class PolicyChangeRegistrar; | 52 class PolicyChangeRegistrar; |
| 52 } | 53 } |
| 53 | 54 |
| 54 namespace options { | 55 namespace options { |
| 55 | 56 |
| 56 // Chrome browser options page UI handler. | 57 // Chrome browser options page UI handler. |
| 57 class BrowserOptionsHandler | 58 class BrowserOptionsHandler |
| 58 : public OptionsPageUIHandler, | 59 : public OptionsPageUIHandler, |
| 59 public ProfileAttributesStorage::Observer, | 60 public ProfileAttributesStorage::Observer, |
| 60 public syncer::SyncServiceObserver, | 61 public syncer::SyncServiceObserver, |
| 61 public SigninManagerBase::Observer, | 62 public SigninManagerBase::Observer, |
| 62 public ui::SelectFileDialog::Listener, | 63 public ui::SelectFileDialog::Listener, |
| 63 #if defined(OS_CHROMEOS) | 64 #if defined(OS_CHROMEOS) |
| 64 public chromeos::system::PointerDeviceObserver::Observer, | 65 public chromeos::system::PointerDeviceObserver::Observer, |
| 65 public ArcAppListPrefs::Observer, | 66 public ArcAppListPrefs::Observer, |
| 67 public user_manager::UserManager::Observer, |
| 66 #endif | 68 #endif |
| 67 public TemplateURLServiceObserver, | 69 public TemplateURLServiceObserver, |
| 68 public extensions::ExtensionRegistryObserver, | 70 public extensions::ExtensionRegistryObserver, |
| 69 public content::NotificationObserver, | 71 public content::NotificationObserver, |
| 70 public policy::PolicyService::Observer { | 72 public policy::PolicyService::Observer { |
| 71 public: | 73 public: |
| 72 BrowserOptionsHandler(); | 74 BrowserOptionsHandler(); |
| 73 ~BrowserOptionsHandler() override; | 75 ~BrowserOptionsHandler() override; |
| 74 | 76 |
| 75 // OptionsPageUIHandler implementation. | 77 // OptionsPageUIHandler implementation. |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 const base::Value* current_policy); | 144 const base::Value* current_policy); |
| 143 | 145 |
| 144 // Will be called when powerwash dialog is shown. | 146 // Will be called when powerwash dialog is shown. |
| 145 void OnPowerwashDialogShow(const base::ListValue* args); | 147 void OnPowerwashDialogShow(const base::ListValue* args); |
| 146 | 148 |
| 147 // ArcAppListPrefs::Observer overrides. | 149 // ArcAppListPrefs::Observer overrides. |
| 148 void OnAppReadyChanged(const std::string& app_id, bool ready) override; | 150 void OnAppReadyChanged(const std::string& app_id, bool ready) override; |
| 149 void OnAppRemoved(const std::string& app_id) override; | 151 void OnAppRemoved(const std::string& app_id) override; |
| 150 void OnAppRegistered(const std::string& app_id, | 152 void OnAppRegistered(const std::string& app_id, |
| 151 const ArcAppListPrefs::AppInfo& app_info) override; | 153 const ArcAppListPrefs::AppInfo& app_info) override; |
| 154 |
| 155 // user_manager::UserManager::Observer overrides. |
| 156 void OnUserImageChanged(const user_manager::User& user) override; |
| 152 #endif | 157 #endif |
| 153 | 158 |
| 154 void UpdateSyncState(); | 159 void UpdateSyncState(); |
| 155 | 160 |
| 156 // Will be called when the kSigninAllowed pref has changed. | 161 // Will be called when the kSigninAllowed pref has changed. |
| 157 void OnSigninAllowedPrefChange(); | 162 void OnSigninAllowedPrefChange(); |
| 158 | 163 |
| 159 // Sets the search engine at the given index to be default. Called from WebUI. | 164 // Sets the search engine at the given index to be default. Called from WebUI. |
| 160 void SetDefaultSearchEngine(const base::ListValue* args); | 165 void SetDefaultSearchEngine(const base::ListValue* args); |
| 161 | 166 |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 | 446 |
| 442 // Used to get WeakPtr to self for use on the UI thread. | 447 // Used to get WeakPtr to self for use on the UI thread. |
| 443 base::WeakPtrFactory<BrowserOptionsHandler> weak_ptr_factory_; | 448 base::WeakPtrFactory<BrowserOptionsHandler> weak_ptr_factory_; |
| 444 | 449 |
| 445 DISALLOW_COPY_AND_ASSIGN(BrowserOptionsHandler); | 450 DISALLOW_COPY_AND_ASSIGN(BrowserOptionsHandler); |
| 446 }; | 451 }; |
| 447 | 452 |
| 448 } // namespace options | 453 } // namespace options |
| 449 | 454 |
| 450 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_ | 455 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_ |
| OLD | NEW |