Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Unified Diff: chrome/browser/chromeos/locale_change_guard.h

Issue 10391177: Add TrayLocale for locale change notifications. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase w/ icons in tot Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/tray/system_tray.cc ('k') | chrome/browser/chromeos/locale_change_guard.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/locale_change_guard.h
diff --git a/chrome/browser/chromeos/locale_change_guard.h b/chrome/browser/chromeos/locale_change_guard.h
index 2c9ac6e5fd8beff1d67772b21225ab033f842f05..b5024630e5f6efef690a5227d29625cb514fc1b9 100644
--- a/chrome/browser/chromeos/locale_change_guard.h
+++ b/chrome/browser/chromeos/locale_change_guard.h
@@ -8,6 +8,7 @@
#include <string>
+#include "ash/system/locale/locale_observer.h"
#include "base/compiler_specific.h"
#include "base/lazy_instance.h"
#include "base/memory/scoped_ptr.h"
@@ -29,11 +30,16 @@ namespace chromeos {
// (based on synchronized user preference). If so: shows notification that
// allows user to revert change.
class LocaleChangeGuard : public content::NotificationObserver,
+ public ash::LocaleObserver::Delegate,
public base::SupportsWeakPtr<LocaleChangeGuard> {
public:
explicit LocaleChangeGuard(Profile* profile);
virtual ~LocaleChangeGuard();
+ // ash::LocaleChangeDelegate implementation.
+ virtual void AcceptLocaleChange() OVERRIDE;
+ virtual void RevertLocaleChange() OVERRIDE;
+
// Called just before changing locale.
void PrepareChangingLocale(
const std::string& from_locale, const std::string& to_locale);
@@ -44,8 +50,7 @@ class LocaleChangeGuard : public content::NotificationObserver,
private:
class Delegate;
- void RevertLocaleChange(const base::ListValue* list);
- void AcceptLocaleChange();
+ void RevertLocaleChangeCallback(const base::ListValue* list);
void Check();
// content::NotificationObserver implementation.
« no previous file with comments | « ash/system/tray/system_tray.cc ('k') | chrome/browser/chromeos/locale_change_guard.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698