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

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: 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
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..b261a35a2e2ceaef713af39f59564c9fcc002a26 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/tray_locale.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::LocaleChangeDelegate,
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.

Powered by Google App Engine
This is Rietveld 408576698