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

Unified Diff: ash/common/system/tray/wm_system_tray_notifier.cc

Issue 2082193002: mash: Migrate locale observer and notification to common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Format Created 4 years, 6 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: ash/common/system/tray/wm_system_tray_notifier.cc
diff --git a/ash/common/system/tray/wm_system_tray_notifier.cc b/ash/common/system/tray/wm_system_tray_notifier.cc
index 4e40c5ac563150c635fe56e0e22e3d85935b9c6d..2e18d634c7a26755bb366e0cc068ca6b7ebb3051 100644
--- a/ash/common/system/tray/wm_system_tray_notifier.cc
+++ b/ash/common/system/tray/wm_system_tray_notifier.cc
@@ -79,6 +79,24 @@ void WmSystemTrayNotifier::NotifyRefreshIMEMenu(bool is_active) {
OnIMEMenuActivationChanged(is_active));
}
+void WmSystemTrayNotifier::AddLocaleObserver(LocaleObserver* observer) {
+ locale_observers_.AddObserver(observer);
+}
+
+void WmSystemTrayNotifier::RemoveLocaleObserver(LocaleObserver* observer) {
+ locale_observers_.RemoveObserver(observer);
+}
+
+void WmSystemTrayNotifier::NotifyLocaleChanged(
+ LocaleObserver::Delegate* delegate,
+ const std::string& cur_locale,
+ const std::string& from_locale,
+ const std::string& to_locale) {
+ FOR_EACH_OBSERVER(
+ LocaleObserver, locale_observers_,
+ OnLocaleChanged(delegate, cur_locale, from_locale, to_locale));
+}
+
void WmSystemTrayNotifier::AddUpdateObserver(UpdateObserver* observer) {
update_observers_.AddObserver(observer);
}

Powered by Google App Engine
This is Rietveld 408576698