| 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/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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 } | 94 } |
| 95 | 95 |
| 96 void SystemTrayNotifier::AddUpdateObserver(UpdateObserver* observer) { | 96 void SystemTrayNotifier::AddUpdateObserver(UpdateObserver* observer) { |
| 97 update_observers_.AddObserver(observer); | 97 update_observers_.AddObserver(observer); |
| 98 } | 98 } |
| 99 | 99 |
| 100 void SystemTrayNotifier::RemoveUpdateObserver(UpdateObserver* observer) { | 100 void SystemTrayNotifier::RemoveUpdateObserver(UpdateObserver* observer) { |
| 101 update_observers_.RemoveObserver(observer); | 101 update_observers_.RemoveObserver(observer); |
| 102 } | 102 } |
| 103 | 103 |
| 104 void SystemTrayNotifier::NotifyUpdateRecommended(const UpdateInfo& info) { | 104 void SystemTrayNotifier::ShowUpdateIcon(mojom::UpdateSeverity severity, |
| 105 bool factory_reset_required) { |
| 105 for (auto& observer : update_observers_) | 106 for (auto& observer : update_observers_) |
| 106 observer.OnUpdateRecommended(info); | 107 observer.ShowUpdateIcon(severity, factory_reset_required); |
| 107 } | 108 } |
| 108 | 109 |
| 109 void SystemTrayNotifier::AddUserObserver(UserObserver* observer) { | 110 void SystemTrayNotifier::AddUserObserver(UserObserver* observer) { |
| 110 user_observers_.AddObserver(observer); | 111 user_observers_.AddObserver(observer); |
| 111 } | 112 } |
| 112 | 113 |
| 113 void SystemTrayNotifier::RemoveUserObserver(UserObserver* observer) { | 114 void SystemTrayNotifier::RemoveUserObserver(UserObserver* observer) { |
| 114 user_observers_.RemoveObserver(observer); | 115 user_observers_.RemoveObserver(observer); |
| 115 } | 116 } |
| 116 | 117 |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 | 330 |
| 330 void SystemTrayNotifier::NotifyVirtualKeyboardSuppressionChanged( | 331 void SystemTrayNotifier::NotifyVirtualKeyboardSuppressionChanged( |
| 331 bool suppressed) { | 332 bool suppressed) { |
| 332 for (auto& observer : virtual_keyboard_observers_) | 333 for (auto& observer : virtual_keyboard_observers_) |
| 333 observer.OnKeyboardSuppressionChanged(suppressed); | 334 observer.OnKeyboardSuppressionChanged(suppressed); |
| 334 } | 335 } |
| 335 | 336 |
| 336 #endif // defined(OS_CHROMEOS) | 337 #endif // defined(OS_CHROMEOS) |
| 337 | 338 |
| 338 } // namespace ash | 339 } // namespace ash |
| OLD | NEW |