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

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

Issue 2920883002: chromeos: Make ash system tray directly observe IME state changes (Closed)
Patch Set: Created 3 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 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/system/tray/system_tray_notifier.h" 5 #include "ash/system/tray/system_tray_notifier.h"
6 6
7 #include "ash/system/accessibility_observer.h" 7 #include "ash/system/accessibility_observer.h"
8 #include "ash/system/bluetooth/bluetooth_observer.h" 8 #include "ash/system/bluetooth/bluetooth_observer.h"
9 #include "ash/system/date/clock_observer.h" 9 #include "ash/system/date/clock_observer.h"
10 #include "ash/system/enterprise/enterprise_domain_observer.h" 10 #include "ash/system/enterprise/enterprise_domain_observer.h"
11 #include "ash/system/ime/ime_observer.h"
12 #include "ash/system/network/network_observer.h" 11 #include "ash/system/network/network_observer.h"
13 #include "ash/system/network/network_portal_detector_observer.h" 12 #include "ash/system/network/network_portal_detector_observer.h"
14 #include "ash/system/screen_security/screen_capture_observer.h" 13 #include "ash/system/screen_security/screen_capture_observer.h"
15 #include "ash/system/screen_security/screen_share_observer.h" 14 #include "ash/system/screen_security/screen_share_observer.h"
16 #include "ash/system/session/last_window_closed_observer.h" 15 #include "ash/system/session/last_window_closed_observer.h"
17 #include "ash/system/session/logout_button_observer.h" 16 #include "ash/system/session/logout_button_observer.h"
18 #include "ash/system/session/session_length_limit_observer.h" 17 #include "ash/system/session/session_length_limit_observer.h"
19 #include "ash/system/status_area_focus_observer.h" 18 #include "ash/system/status_area_focus_observer.h"
20 #include "ash/system/tray_tracing.h" 19 #include "ash/system/tray_tracing.h"
21 #include "ash/system/virtual_keyboard/virtual_keyboard_observer.h" 20 #include "ash/system/virtual_keyboard/virtual_keyboard_observer.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 void SystemTrayNotifier::RemoveEnterpriseDomainObserver( 95 void SystemTrayNotifier::RemoveEnterpriseDomainObserver(
97 EnterpriseDomainObserver* observer) { 96 EnterpriseDomainObserver* observer) {
98 enterprise_domain_observers_.RemoveObserver(observer); 97 enterprise_domain_observers_.RemoveObserver(observer);
99 } 98 }
100 99
101 void SystemTrayNotifier::NotifyEnterpriseDomainChanged() { 100 void SystemTrayNotifier::NotifyEnterpriseDomainChanged() {
102 for (auto& observer : enterprise_domain_observers_) 101 for (auto& observer : enterprise_domain_observers_)
103 observer.OnEnterpriseDomainChanged(); 102 observer.OnEnterpriseDomainChanged();
104 } 103 }
105 104
106 void SystemTrayNotifier::AddIMEObserver(IMEObserver* observer) {
107 ime_observers_.AddObserver(observer);
108 }
109
110 void SystemTrayNotifier::RemoveIMEObserver(IMEObserver* observer) {
111 ime_observers_.RemoveObserver(observer);
112 }
113
114 void SystemTrayNotifier::NotifyRefreshIME() {
115 for (auto& observer : ime_observers_)
116 observer.OnIMERefresh();
117 }
118
119 void SystemTrayNotifier::NotifyRefreshIMEMenu(bool is_active) {
120 for (auto& observer : ime_observers_)
121 observer.OnIMEMenuActivationChanged(is_active);
122 }
123
124 void SystemTrayNotifier::AddLastWindowClosedObserver( 105 void SystemTrayNotifier::AddLastWindowClosedObserver(
125 LastWindowClosedObserver* observer) { 106 LastWindowClosedObserver* observer) {
126 last_window_closed_observers_.AddObserver(observer); 107 last_window_closed_observers_.AddObserver(observer);
127 } 108 }
128 109
129 void SystemTrayNotifier::RemoveLastWindowClosedObserver( 110 void SystemTrayNotifier::RemoveLastWindowClosedObserver(
130 LastWindowClosedObserver* observer) { 111 LastWindowClosedObserver* observer) {
131 last_window_closed_observers_.RemoveObserver(observer); 112 last_window_closed_observers_.RemoveObserver(observer);
132 } 113 }
133 114
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 virtual_keyboard_observers_.RemoveObserver(observer); 268 virtual_keyboard_observers_.RemoveObserver(observer);
288 } 269 }
289 270
290 void SystemTrayNotifier::NotifyVirtualKeyboardSuppressionChanged( 271 void SystemTrayNotifier::NotifyVirtualKeyboardSuppressionChanged(
291 bool suppressed) { 272 bool suppressed) {
292 for (auto& observer : virtual_keyboard_observers_) 273 for (auto& observer : virtual_keyboard_observers_)
293 observer.OnKeyboardSuppressionChanged(suppressed); 274 observer.OnKeyboardSuppressionChanged(suppressed);
294 } 275 }
295 276
296 } // namespace ash 277 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/system_tray_notifier.h ('k') | chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698