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

Side by Side Diff: ash/common/system/tray/system_tray_notifier.cc

Issue 2420753002: ash: Use mojo LocaleNotificationController interface. (Closed)
Patch Set: Remove dead code + cl lint Created 4 years, 2 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 unified diff | Download patch
OLDNEW
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/system_tray_notifier.h" 5 #include "ash/common/system/tray/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/audio/audio_observer.h" 8 #include "ash/common/system/audio/audio_observer.h"
9 #include "ash/common/system/date/clock_observer.h" 9 #include "ash/common/system/date/clock_observer.h"
10 #include "ash/common/system/ime/ime_observer.h" 10 #include "ash/common/system/ime/ime_observer.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 void SystemTrayNotifier::NotifyRefreshIME() { 119 void SystemTrayNotifier::NotifyRefreshIME() {
120 FOR_EACH_OBSERVER(IMEObserver, ime_observers_, OnIMERefresh()); 120 FOR_EACH_OBSERVER(IMEObserver, ime_observers_, OnIMERefresh());
121 } 121 }
122 122
123 void SystemTrayNotifier::NotifyRefreshIMEMenu(bool is_active) { 123 void SystemTrayNotifier::NotifyRefreshIMEMenu(bool is_active) {
124 FOR_EACH_OBSERVER(IMEObserver, ime_observers_, 124 FOR_EACH_OBSERVER(IMEObserver, ime_observers_,
125 OnIMEMenuActivationChanged(is_active)); 125 OnIMEMenuActivationChanged(is_active));
126 } 126 }
127 127
128 void SystemTrayNotifier::AddLocaleObserver(LocaleObserver* observer) {
129 locale_observers_.AddObserver(observer);
130 }
131
132 void SystemTrayNotifier::RemoveLocaleObserver(LocaleObserver* observer) {
133 locale_observers_.RemoveObserver(observer);
134 }
135
136 void SystemTrayNotifier::NotifyLocaleChanged(LocaleObserver::Delegate* delegate,
137 const std::string& cur_locale,
138 const std::string& from_locale,
139 const std::string& to_locale) {
140 FOR_EACH_OBSERVER(
141 LocaleObserver, locale_observers_,
142 OnLocaleChanged(delegate, cur_locale, from_locale, to_locale));
143 }
144
145 void SystemTrayNotifier::AddUpdateObserver(UpdateObserver* observer) { 128 void SystemTrayNotifier::AddUpdateObserver(UpdateObserver* observer) {
146 update_observers_.AddObserver(observer); 129 update_observers_.AddObserver(observer);
147 } 130 }
148 131
149 void SystemTrayNotifier::RemoveUpdateObserver(UpdateObserver* observer) { 132 void SystemTrayNotifier::RemoveUpdateObserver(UpdateObserver* observer) {
150 update_observers_.RemoveObserver(observer); 133 update_observers_.RemoveObserver(observer);
151 } 134 }
152 135
153 void SystemTrayNotifier::NotifyUpdateRecommended(const UpdateInfo& info) { 136 void SystemTrayNotifier::NotifyUpdateRecommended(const UpdateInfo& info) {
154 FOR_EACH_OBSERVER(UpdateObserver, update_observers_, 137 FOR_EACH_OBSERVER(UpdateObserver, update_observers_,
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 357
375 void SystemTrayNotifier::NotifyVirtualKeyboardSuppressionChanged( 358 void SystemTrayNotifier::NotifyVirtualKeyboardSuppressionChanged(
376 bool suppressed) { 359 bool suppressed) {
377 FOR_EACH_OBSERVER(VirtualKeyboardObserver, virtual_keyboard_observers_, 360 FOR_EACH_OBSERVER(VirtualKeyboardObserver, virtual_keyboard_observers_,
378 OnKeyboardSuppressionChanged(suppressed)); 361 OnKeyboardSuppressionChanged(suppressed));
379 } 362 }
380 363
381 #endif // defined(OS_CHROMEOS) 364 #endif // defined(OS_CHROMEOS)
382 365
383 } // namespace ash 366 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698