Chromium Code Reviews| Index: chrome/browser/chromeos/locale_change_guard.cc |
| diff --git a/chrome/browser/chromeos/locale_change_guard.cc b/chrome/browser/chromeos/locale_change_guard.cc |
| index 606bfb49cbadf3529bf5580c1df43d2b9d43a4ef..7c573af03093d3ca0764a12ee40387b462c24395 100644 |
| --- a/chrome/browser/chromeos/locale_change_guard.cc |
| +++ b/chrome/browser/chromeos/locale_change_guard.cc |
| @@ -6,6 +6,8 @@ |
| #include "ash/shell.h" |
| #include "ash/system/tray/system_tray.h" |
| +#include "ash/system/tray/system_tray_delegate.h" |
| +#include "ash/system/tray/system_tray_observers.h" |
| #include "base/bind.h" |
| #include "base/utf_string_conversions.h" |
| #include "chrome/app/chrome_command_ids.h" |
| @@ -171,9 +173,13 @@ void LocaleChangeGuard::Check() { |
| PrepareChangingLocale(from_locale, to_locale); |
| } |
| - if (ash::Shell::GetInstance()->status_area_widget()) { |
| - ash::Shell::GetInstance()->system_tray()->locale_observer()-> |
| - OnLocaleChanged(this, cur_locale, from_locale_, to_locale_); |
| + ash::SystemTrayObservers* observers = |
| + ash::Shell::GetInstance()->tray_delegate()->GetSystemTrayObservers(); |
|
oshima
2012/11/09 19:21:50
TrayDelegate has NotifyXXX methods for several oth
sadrul
2012/11/09 23:26:32
I agree that it would be nice if these places all
stevenjb
2012/11/09 23:40:45
Yeah, I started to create NotifyXXX, but realized
|
| + if (observers) { |
| + FOR_EACH_OBSERVER( |
| + ash::LocaleObserver, |
| + observers->locale_observers(), |
| + OnLocaleChanged(this, cur_locale, from_locale_, to_locale_)); |
| } |
| } |