| 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/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" |
| 11 #include "ash/common/system/status_area_focus_observer.h" |
| 11 #include "ash/common/system/update/update_observer.h" | 12 #include "ash/common/system/update/update_observer.h" |
| 12 #include "ash/common/system/user/user_observer.h" | 13 #include "ash/common/system/user/user_observer.h" |
| 13 | 14 |
| 14 #if defined(OS_CHROMEOS) | 15 #if defined(OS_CHROMEOS) |
| 15 #include "ash/common/system/chromeos/bluetooth/bluetooth_observer.h" | 16 #include "ash/common/system/chromeos/bluetooth/bluetooth_observer.h" |
| 16 #include "ash/common/system/chromeos/enterprise/enterprise_domain_observer.h" | 17 #include "ash/common/system/chromeos/enterprise/enterprise_domain_observer.h" |
| 17 #include "ash/common/system/chromeos/media_security/media_capture_observer.h" | 18 #include "ash/common/system/chromeos/media_security/media_capture_observer.h" |
| 18 #include "ash/common/system/chromeos/network/network_observer.h" | 19 #include "ash/common/system/chromeos/network/network_observer.h" |
| 19 #include "ash/common/system/chromeos/network/network_portal_detector_observer.h" | 20 #include "ash/common/system/chromeos/network/network_portal_detector_observer.h" |
| 20 #include "ash/common/system/chromeos/screen_security/screen_capture_observer.h" | 21 #include "ash/common/system/chromeos/screen_security/screen_capture_observer.h" |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 | 149 |
| 149 void SystemTrayNotifier::RemoveUpdateObserver(UpdateObserver* observer) { | 150 void SystemTrayNotifier::RemoveUpdateObserver(UpdateObserver* observer) { |
| 150 update_observers_.RemoveObserver(observer); | 151 update_observers_.RemoveObserver(observer); |
| 151 } | 152 } |
| 152 | 153 |
| 153 void SystemTrayNotifier::NotifyUpdateRecommended(const UpdateInfo& info) { | 154 void SystemTrayNotifier::NotifyUpdateRecommended(const UpdateInfo& info) { |
| 154 FOR_EACH_OBSERVER(UpdateObserver, update_observers_, | 155 FOR_EACH_OBSERVER(UpdateObserver, update_observers_, |
| 155 OnUpdateRecommended(info)); | 156 OnUpdateRecommended(info)); |
| 156 } | 157 } |
| 157 | 158 |
| 159 void SystemTrayNotifier::AddStatusAreaFocusObserver( |
| 160 StatusAreaFocusObserver* observer) { |
| 161 status_area_focus_observers_.AddObserver(observer); |
| 162 } |
| 163 |
| 164 void SystemTrayNotifier::RemoveStatusAreaFocusObserver( |
| 165 StatusAreaFocusObserver* observer) { |
| 166 status_area_focus_observers_.RemoveObserver(observer); |
| 167 } |
| 168 |
| 169 void SystemTrayNotifier::NotifyWillReturnFocusToWebContents(bool reverse) { |
| 170 FOR_EACH_OBSERVER(StatusAreaFocusObserver, status_area_focus_observers_, |
| 171 OnWillReturnFocusToWebContents(reverse)); |
| 172 } |
| 173 |
| 158 void SystemTrayNotifier::AddUserObserver(UserObserver* observer) { | 174 void SystemTrayNotifier::AddUserObserver(UserObserver* observer) { |
| 159 user_observers_.AddObserver(observer); | 175 user_observers_.AddObserver(observer); |
| 160 } | 176 } |
| 161 | 177 |
| 162 void SystemTrayNotifier::RemoveUserObserver(UserObserver* observer) { | 178 void SystemTrayNotifier::RemoveUserObserver(UserObserver* observer) { |
| 163 user_observers_.RemoveObserver(observer); | 179 user_observers_.RemoveObserver(observer); |
| 164 } | 180 } |
| 165 | 181 |
| 166 void SystemTrayNotifier::NotifyUserUpdate() { | 182 void SystemTrayNotifier::NotifyUserUpdate() { |
| 167 FOR_EACH_OBSERVER(UserObserver, user_observers_, OnUserUpdate()); | 183 FOR_EACH_OBSERVER(UserObserver, user_observers_, OnUserUpdate()); |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 | 390 |
| 375 void SystemTrayNotifier::NotifyVirtualKeyboardSuppressionChanged( | 391 void SystemTrayNotifier::NotifyVirtualKeyboardSuppressionChanged( |
| 376 bool suppressed) { | 392 bool suppressed) { |
| 377 FOR_EACH_OBSERVER(VirtualKeyboardObserver, virtual_keyboard_observers_, | 393 FOR_EACH_OBSERVER(VirtualKeyboardObserver, virtual_keyboard_observers_, |
| 378 OnKeyboardSuppressionChanged(suppressed)); | 394 OnKeyboardSuppressionChanged(suppressed)); |
| 379 } | 395 } |
| 380 | 396 |
| 381 #endif // defined(OS_CHROMEOS) | 397 #endif // defined(OS_CHROMEOS) |
| 382 | 398 |
| 383 } // namespace ash | 399 } // namespace ash |
| OLD | NEW |