diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-19 14:12:23 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-19 14:12:23 +0000 |
commit | 1ab7761d57f2144fac3f03958e571410b595a2b9 (patch) | |
tree | b955a9d1e73f56d953339e852a7402faf9141a09 /chrome/browser/webui/options/personal_options_handler.h | |
parent | c1338959f5d9fa970750a3007c52f3151b877232 (diff) | |
download | chromium_src-1ab7761d57f2144fac3f03958e571410b595a2b9.zip chromium_src-1ab7761d57f2144fac3f03958e571410b595a2b9.tar.gz chromium_src-1ab7761d57f2144fac3f03958e571410b595a2b9.tar.bz2 |
WebUI: Move chrome/browser/dom_ui/options/ to chrome/browser/webui/options.
To reduce the size of this change I've left stub header files in chrome/browser/dom_ui/options.
I'll updated the references and delete the stub files later.
BUG=59945, 59946
TEST=trybots
Review URL: http://codereview.chromium.org/6469067
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75496 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/webui/options/personal_options_handler.h')
-rw-r--r-- | chrome/browser/webui/options/personal_options_handler.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/chrome/browser/webui/options/personal_options_handler.h b/chrome/browser/webui/options/personal_options_handler.h new file mode 100644 index 0000000..67e2793 --- /dev/null +++ b/chrome/browser/webui/options/personal_options_handler.h @@ -0,0 +1,66 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_WEBUI_OPTIONS_PERSONAL_OPTIONS_HANDLER_H_ +#define CHROME_BROWSER_WEBUI_OPTIONS_PERSONAL_OPTIONS_HANDLER_H_ +#pragma once + +#include "base/basictypes.h" +#include "chrome/browser/browser_signin.h" +#include "chrome/browser/dom_ui/options/options_ui.h" +#include "chrome/browser/sync/profile_sync_service.h" + +class OptionsManagedBannerHandler; + +// Chrome personal options page UI handler. +class PersonalOptionsHandler : public OptionsPageUIHandler, + public ProfileSyncServiceObserver, + public BrowserSignin::SigninDelegate { + public: + PersonalOptionsHandler(); + virtual ~PersonalOptionsHandler(); + + // OptionsUIHandler implementation. + virtual void GetLocalizedValues(DictionaryValue* localized_strings); + virtual void Initialize(); + + // WebUIMessageHandler implementation. + virtual void RegisterMessages(); + + // NotificationObserver implementation. + virtual void Observe(NotificationType type, + const NotificationSource& source, + const NotificationDetails& details); + + // ProfileSyncServiceObserver implementation. + virtual void OnStateChanged(); + + // BrowserSignin::SigninDelegate implementation. + virtual void OnLoginSuccess(); + virtual void OnLoginFailure(const GoogleServiceAuthError& error); + + private: + void ObserveThemeChanged(); + void ShowSyncActionDialog(const ListValue* args); + void ShowSyncLoginDialog(const ListValue* args); + void ShowCustomizeSyncDialog(const ListValue* args); + void ThemesReset(const ListValue* args); +#if defined(TOOLKIT_GTK) + void ThemesSetGTK(const ListValue* args); +#endif + + // Called when the user updates the set of enabled data types to sync. |args| + // is ignored. + void OnPreferredDataTypesUpdated(const ListValue* args); + +#if defined(OS_CHROMEOS) + void LoadAccountPicture(const ListValue* args); +#endif + + scoped_ptr<OptionsManagedBannerHandler> banner_handler_; + + DISALLOW_COPY_AND_ASSIGN(PersonalOptionsHandler); +}; + +#endif // CHROME_BROWSER_WEBUI_OPTIONS_PERSONAL_OPTIONS_HANDLER_H_ |