Chromium Code Reviews| 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 5bfbfefac40c506e37614b6335abaf14a9e7fb6c..653d754250f9e3821c7e6fa05c701e4df4edc0f8 100644 |
| --- a/ash/common/system/tray/wm_system_tray_notifier.cc |
| +++ b/ash/common/system/tray/wm_system_tray_notifier.cc |
| @@ -6,8 +6,13 @@ |
| #include "ash/common/system/accessibility_observer.h" |
| #include "ash/common/system/date/clock_observer.h" |
| +#include "ash/common/system/ime/ime_observer.h" |
| #include "ash/common/system/update/update_observer.h" |
| +#if defined(OS_CHROMEOS) |
| +#include "ash/common/system/chromeos/virtual_keyboard/virtual_keyboard_observer.h" |
| +#endif |
| + |
| namespace ash { |
| WmSystemTrayNotifier::WmSystemTrayNotifier() {} |
| @@ -24,6 +29,14 @@ void WmSystemTrayNotifier::RemoveAccessibilityObserver( |
| accessibility_observers_.RemoveObserver(observer); |
| } |
| +void WmSystemTrayNotifier::AddIMEObserver(IMEObserver* observer) { |
|
msw
2016/06/21 01:27:24
nit: order after *clock*observer (to match decls)
James Cook
2016/06/21 17:31:01
Done.
|
| + ime_observers_.AddObserver(observer); |
| +} |
| + |
| +void WmSystemTrayNotifier::RemoveIMEObserver(IMEObserver* observer) { |
| + ime_observers_.RemoveObserver(observer); |
| +} |
| + |
| void WmSystemTrayNotifier::AddClockObserver(ClockObserver* observer) { |
| clock_observers_.AddObserver(observer); |
| } |
| @@ -40,6 +53,18 @@ void WmSystemTrayNotifier::RemoveUpdateObserver(UpdateObserver* observer) { |
| update_observers_.RemoveObserver(observer); |
| } |
| +#if defined(OS_CHROMEOS) |
| +void WmSystemTrayNotifier::AddVirtualKeyboardObserver( |
| + VirtualKeyboardObserver* observer) { |
| + virtual_keyboard_observers_.AddObserver(observer); |
| +} |
| + |
| +void WmSystemTrayNotifier::RemoveVirtualKeyboardObserver( |
| + VirtualKeyboardObserver* observer) { |
| + virtual_keyboard_observers_.RemoveObserver(observer); |
| +} |
| +#endif // defined(OS_CHROMEOS) |
| + |
| void WmSystemTrayNotifier::NotifyAccessibilityModeChanged( |
| AccessibilityNotificationVisibility notify) { |
| FOR_EACH_OBSERVER(AccessibilityObserver, accessibility_observers_, |
| @@ -50,6 +75,15 @@ void WmSystemTrayNotifier::NotifyRefreshClock() { |
| FOR_EACH_OBSERVER(ClockObserver, clock_observers_, Refresh()); |
| } |
| +void WmSystemTrayNotifier::NotifyRefreshIME() { |
|
msw
2016/06/21 01:27:24
ditto nit: order after notify*clock
James Cook
2016/06/21 17:31:01
Done.
|
| + FOR_EACH_OBSERVER(IMEObserver, ime_observers_, OnIMERefresh()); |
| +} |
| + |
| +void WmSystemTrayNotifier::NotifyRefreshIMEMenu(bool is_active) { |
| + FOR_EACH_OBSERVER(IMEObserver, ime_observers_, |
| + OnIMEMenuActivationChanged(is_active)); |
| +} |
| + |
| void WmSystemTrayNotifier::NotifyDateFormatChanged() { |
| FOR_EACH_OBSERVER(ClockObserver, clock_observers_, OnDateFormatChanged()); |
| } |
| @@ -70,4 +104,12 @@ void WmSystemTrayNotifier::NotifyUpdateRecommended(const UpdateInfo& info) { |
| OnUpdateRecommended(info)); |
| } |
| +#if defined(OS_CHROMEOS) |
| +void WmSystemTrayNotifier::NotifyVirtualKeyboardSuppressionChanged( |
| + bool suppressed) { |
| + FOR_EACH_OBSERVER(VirtualKeyboardObserver, virtual_keyboard_observers_, |
| + OnKeyboardSuppressionChanged(suppressed)); |
| +} |
| +#endif // defined(OS_CHROMEOS) |
| + |
| } // namespace ash |