| 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/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" | 11 #include "ash/system/ime/ime_observer.h" |
| 12 #include "ash/system/network/network_observer.h" | 12 #include "ash/system/network/network_observer.h" |
| 13 #include "ash/system/network/network_portal_detector_observer.h" | 13 #include "ash/system/network/network_portal_detector_observer.h" |
| 14 #include "ash/system/screen_security/screen_capture_observer.h" | 14 #include "ash/system/screen_security/screen_capture_observer.h" |
| 15 #include "ash/system/screen_security/screen_share_observer.h" | 15 #include "ash/system/screen_security/screen_share_observer.h" |
| 16 #include "ash/system/session/last_window_closed_observer.h" | 16 #include "ash/system/session/last_window_closed_observer.h" |
| 17 #include "ash/system/session/logout_button_observer.h" | 17 #include "ash/system/session/logout_button_observer.h" |
| 18 #include "ash/system/status_area_focus_observer.h" | 18 #include "ash/system/status_area_focus_observer.h" |
| 19 #include "ash/system/tray_tracing.h" | 19 #include "ash/system/tray_tracing.h" |
| 20 #include "ash/system/update/update_observer.h" |
| 20 #include "ash/system/virtual_keyboard/virtual_keyboard_observer.h" | 21 #include "ash/system/virtual_keyboard/virtual_keyboard_observer.h" |
| 21 | 22 |
| 22 namespace ash { | 23 namespace ash { |
| 23 | 24 |
| 24 SystemTrayNotifier::SystemTrayNotifier() {} | 25 SystemTrayNotifier::SystemTrayNotifier() {} |
| 25 | 26 |
| 26 SystemTrayNotifier::~SystemTrayNotifier() {} | 27 SystemTrayNotifier::~SystemTrayNotifier() {} |
| 27 | 28 |
| 28 void SystemTrayNotifier::AddAccessibilityObserver( | 29 void SystemTrayNotifier::AddAccessibilityObserver( |
| 29 AccessibilityObserver* observer) { | 30 AccessibilityObserver* observer) { |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 | 250 |
| 250 void SystemTrayNotifier::RemoveTracingObserver(TracingObserver* observer) { | 251 void SystemTrayNotifier::RemoveTracingObserver(TracingObserver* observer) { |
| 251 tracing_observers_.RemoveObserver(observer); | 252 tracing_observers_.RemoveObserver(observer); |
| 252 } | 253 } |
| 253 | 254 |
| 254 void SystemTrayNotifier::NotifyTracingModeChanged(bool value) { | 255 void SystemTrayNotifier::NotifyTracingModeChanged(bool value) { |
| 255 for (auto& observer : tracing_observers_) | 256 for (auto& observer : tracing_observers_) |
| 256 observer.OnTracingModeChanged(value); | 257 observer.OnTracingModeChanged(value); |
| 257 } | 258 } |
| 258 | 259 |
| 260 void SystemTrayNotifier::AddUpdateObserver(UpdateObserver* observer) { |
| 261 update_observers_.AddObserver(observer); |
| 262 } |
| 263 |
| 264 void SystemTrayNotifier::RemoveUpdateObserver(UpdateObserver* observer) { |
| 265 update_observers_.RemoveObserver(observer); |
| 266 } |
| 267 |
| 268 void SystemTrayNotifier::NotifyUpdateOverCellularTargetSet(bool success) { |
| 269 for (auto& observer : update_observers_) |
| 270 observer.OnUpdateOverCellularTargetSet(success); |
| 271 } |
| 272 |
| 259 void SystemTrayNotifier::AddVirtualKeyboardObserver( | 273 void SystemTrayNotifier::AddVirtualKeyboardObserver( |
| 260 VirtualKeyboardObserver* observer) { | 274 VirtualKeyboardObserver* observer) { |
| 261 virtual_keyboard_observers_.AddObserver(observer); | 275 virtual_keyboard_observers_.AddObserver(observer); |
| 262 } | 276 } |
| 263 | 277 |
| 264 void SystemTrayNotifier::RemoveVirtualKeyboardObserver( | 278 void SystemTrayNotifier::RemoveVirtualKeyboardObserver( |
| 265 VirtualKeyboardObserver* observer) { | 279 VirtualKeyboardObserver* observer) { |
| 266 virtual_keyboard_observers_.RemoveObserver(observer); | 280 virtual_keyboard_observers_.RemoveObserver(observer); |
| 267 } | 281 } |
| 268 | 282 |
| 269 void SystemTrayNotifier::NotifyVirtualKeyboardSuppressionChanged( | 283 void SystemTrayNotifier::NotifyVirtualKeyboardSuppressionChanged( |
| 270 bool suppressed) { | 284 bool suppressed) { |
| 271 for (auto& observer : virtual_keyboard_observers_) | 285 for (auto& observer : virtual_keyboard_observers_) |
| 272 observer.OnKeyboardSuppressionChanged(suppressed); | 286 observer.OnKeyboardSuppressionChanged(suppressed); |
| 273 } | 287 } |
| 274 | 288 |
| 275 } // namespace ash | 289 } // namespace ash |
| OLD | NEW |