| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/common/system/tray/wm_system_tray_notifier.h" | 5 #include "ash/common/system/tray/wm_system_tray_notifier.h" |
| 6 | 6 |
| 7 #include "ash/common/system/accessibility_observer.h" | 7 #include "ash/common/system/accessibility_observer.h" |
| 8 #include "ash/common/system/date/clock_observer.h" | 8 #include "ash/common/system/date/clock_observer.h" |
| 9 #include "ash/common/system/ime/ime_observer.h" | 9 #include "ash/common/system/ime/ime_observer.h" |
| 10 #include "ash/common/system/update/update_observer.h" | 10 #include "ash/common/system/update/update_observer.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 72 |
| 73 void WmSystemTrayNotifier::NotifyRefreshIME() { | 73 void WmSystemTrayNotifier::NotifyRefreshIME() { |
| 74 FOR_EACH_OBSERVER(IMEObserver, ime_observers_, OnIMERefresh()); | 74 FOR_EACH_OBSERVER(IMEObserver, ime_observers_, OnIMERefresh()); |
| 75 } | 75 } |
| 76 | 76 |
| 77 void WmSystemTrayNotifier::NotifyRefreshIMEMenu(bool is_active) { | 77 void WmSystemTrayNotifier::NotifyRefreshIMEMenu(bool is_active) { |
| 78 FOR_EACH_OBSERVER(IMEObserver, ime_observers_, | 78 FOR_EACH_OBSERVER(IMEObserver, ime_observers_, |
| 79 OnIMEMenuActivationChanged(is_active)); | 79 OnIMEMenuActivationChanged(is_active)); |
| 80 } | 80 } |
| 81 | 81 |
| 82 void WmSystemTrayNotifier::AddLocaleObserver(LocaleObserver* observer) { |
| 83 locale_observers_.AddObserver(observer); |
| 84 } |
| 85 |
| 86 void WmSystemTrayNotifier::RemoveLocaleObserver(LocaleObserver* observer) { |
| 87 locale_observers_.RemoveObserver(observer); |
| 88 } |
| 89 |
| 90 void WmSystemTrayNotifier::NotifyLocaleChanged( |
| 91 LocaleObserver::Delegate* delegate, |
| 92 const std::string& cur_locale, |
| 93 const std::string& from_locale, |
| 94 const std::string& to_locale) { |
| 95 FOR_EACH_OBSERVER( |
| 96 LocaleObserver, locale_observers_, |
| 97 OnLocaleChanged(delegate, cur_locale, from_locale, to_locale)); |
| 98 } |
| 99 |
| 82 void WmSystemTrayNotifier::AddUpdateObserver(UpdateObserver* observer) { | 100 void WmSystemTrayNotifier::AddUpdateObserver(UpdateObserver* observer) { |
| 83 update_observers_.AddObserver(observer); | 101 update_observers_.AddObserver(observer); |
| 84 } | 102 } |
| 85 | 103 |
| 86 void WmSystemTrayNotifier::RemoveUpdateObserver(UpdateObserver* observer) { | 104 void WmSystemTrayNotifier::RemoveUpdateObserver(UpdateObserver* observer) { |
| 87 update_observers_.RemoveObserver(observer); | 105 update_observers_.RemoveObserver(observer); |
| 88 } | 106 } |
| 89 | 107 |
| 90 void WmSystemTrayNotifier::NotifyUpdateRecommended(const UpdateInfo& info) { | 108 void WmSystemTrayNotifier::NotifyUpdateRecommended(const UpdateInfo& info) { |
| 91 FOR_EACH_OBSERVER(UpdateObserver, update_observers_, | 109 FOR_EACH_OBSERVER(UpdateObserver, update_observers_, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 106 | 124 |
| 107 void WmSystemTrayNotifier::NotifyVirtualKeyboardSuppressionChanged( | 125 void WmSystemTrayNotifier::NotifyVirtualKeyboardSuppressionChanged( |
| 108 bool suppressed) { | 126 bool suppressed) { |
| 109 FOR_EACH_OBSERVER(VirtualKeyboardObserver, virtual_keyboard_observers_, | 127 FOR_EACH_OBSERVER(VirtualKeyboardObserver, virtual_keyboard_observers_, |
| 110 OnKeyboardSuppressionChanged(suppressed)); | 128 OnKeyboardSuppressionChanged(suppressed)); |
| 111 } | 129 } |
| 112 | 130 |
| 113 #endif // defined(OS_CHROMEOS) | 131 #endif // defined(OS_CHROMEOS) |
| 114 | 132 |
| 115 } // namespace ash | 133 } // namespace ash |
| OLD | NEW |