| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_DOM_UI_OPTIONS_PERSONAL_OPTIONS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_DOM_UI_OPTIONS_PERSONAL_OPTIONS_HANDLER_H_ |
| 6 #define CHROME_BROWSER_DOM_UI_OPTIONS_PERSONAL_OPTIONS_HANDLER_H_ | 6 #define CHROME_BROWSER_DOM_UI_OPTIONS_PERSONAL_OPTIONS_HANDLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "chrome/browser/webui/options/personal_options_handler.h" |
| 10 #include "chrome/browser/browser_signin.h" | 10 // TODO(tfarina): remove this file once all includes have been updated. |
| 11 #include "chrome/browser/dom_ui/options/options_ui.h" | |
| 12 #include "chrome/browser/sync/profile_sync_service.h" | |
| 13 | |
| 14 class OptionsManagedBannerHandler; | |
| 15 | |
| 16 // Chrome personal options page UI handler. | |
| 17 class PersonalOptionsHandler : public OptionsPageUIHandler, | |
| 18 public ProfileSyncServiceObserver, | |
| 19 public BrowserSignin::SigninDelegate { | |
| 20 public: | |
| 21 PersonalOptionsHandler(); | |
| 22 virtual ~PersonalOptionsHandler(); | |
| 23 | |
| 24 // OptionsUIHandler implementation. | |
| 25 virtual void GetLocalizedValues(DictionaryValue* localized_strings); | |
| 26 virtual void Initialize(); | |
| 27 | |
| 28 // WebUIMessageHandler implementation. | |
| 29 virtual void RegisterMessages(); | |
| 30 | |
| 31 // NotificationObserver implementation. | |
| 32 virtual void Observe(NotificationType type, | |
| 33 const NotificationSource& source, | |
| 34 const NotificationDetails& details); | |
| 35 | |
| 36 // ProfileSyncServiceObserver implementation. | |
| 37 virtual void OnStateChanged(); | |
| 38 | |
| 39 // BrowserSignin::SigninDelegate implementation. | |
| 40 virtual void OnLoginSuccess(); | |
| 41 virtual void OnLoginFailure(const GoogleServiceAuthError& error); | |
| 42 | |
| 43 private: | |
| 44 void ObserveThemeChanged(); | |
| 45 void ShowSyncActionDialog(const ListValue* args); | |
| 46 void ShowSyncLoginDialog(const ListValue* args); | |
| 47 void ShowCustomizeSyncDialog(const ListValue* args); | |
| 48 void ThemesReset(const ListValue* args); | |
| 49 #if defined(TOOLKIT_GTK) | |
| 50 void ThemesSetGTK(const ListValue* args); | |
| 51 #endif | |
| 52 | |
| 53 // Called when the user updates the set of enabled data types to sync. |args| | |
| 54 // is ignored. | |
| 55 void OnPreferredDataTypesUpdated(const ListValue* args); | |
| 56 | |
| 57 #if defined(OS_CHROMEOS) | |
| 58 void LoadAccountPicture(const ListValue* args); | |
| 59 #endif | |
| 60 | |
| 61 scoped_ptr<OptionsManagedBannerHandler> banner_handler_; | |
| 62 | |
| 63 DISALLOW_COPY_AND_ASSIGN(PersonalOptionsHandler); | |
| 64 }; | |
| 65 | 11 |
| 66 #endif // CHROME_BROWSER_DOM_UI_OPTIONS_PERSONAL_OPTIONS_HANDLER_H_ | 12 #endif // CHROME_BROWSER_DOM_UI_OPTIONS_PERSONAL_OPTIONS_HANDLER_H_ |
| OLD | NEW |