| 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/wm_system_tray_notifier.h" | 5 #include "ash/common/system/tray/wm_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/update/update_observer.h" | 9 #include "ash/common/system/update/update_observer.h" |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 void WmSystemTrayNotifier::AddUpdateObserver(UpdateObserver* observer) { | 35 void WmSystemTrayNotifier::AddUpdateObserver(UpdateObserver* observer) { |
| 36 update_observers_.AddObserver(observer); | 36 update_observers_.AddObserver(observer); |
| 37 } | 37 } |
| 38 | 38 |
| 39 void WmSystemTrayNotifier::RemoveUpdateObserver(UpdateObserver* observer) { | 39 void WmSystemTrayNotifier::RemoveUpdateObserver(UpdateObserver* observer) { |
| 40 update_observers_.RemoveObserver(observer); | 40 update_observers_.RemoveObserver(observer); |
| 41 } | 41 } |
| 42 | 42 |
| 43 void WmSystemTrayNotifier::NotifyAccessibilityModeChanged( | 43 void WmSystemTrayNotifier::NotifyAccessibilityModeChanged( |
| 44 ui::AccessibilityNotificationVisibility notify) { | 44 AccessibilityNotificationVisibility notify) { |
| 45 FOR_EACH_OBSERVER(AccessibilityObserver, accessibility_observers_, | 45 FOR_EACH_OBSERVER(AccessibilityObserver, accessibility_observers_, |
| 46 OnAccessibilityModeChanged(notify)); | 46 OnAccessibilityModeChanged(notify)); |
| 47 } | 47 } |
| 48 | 48 |
| 49 void WmSystemTrayNotifier::NotifyRefreshClock() { | 49 void WmSystemTrayNotifier::NotifyRefreshClock() { |
| 50 FOR_EACH_OBSERVER(ClockObserver, clock_observers_, Refresh()); | 50 FOR_EACH_OBSERVER(ClockObserver, clock_observers_, Refresh()); |
| 51 } | 51 } |
| 52 | 52 |
| 53 void WmSystemTrayNotifier::NotifyDateFormatChanged() { | 53 void WmSystemTrayNotifier::NotifyDateFormatChanged() { |
| 54 FOR_EACH_OBSERVER(ClockObserver, clock_observers_, OnDateFormatChanged()); | 54 FOR_EACH_OBSERVER(ClockObserver, clock_observers_, OnDateFormatChanged()); |
| 55 } | 55 } |
| 56 | 56 |
| 57 void WmSystemTrayNotifier::NotifySystemClockTimeUpdated() { | 57 void WmSystemTrayNotifier::NotifySystemClockTimeUpdated() { |
| 58 FOR_EACH_OBSERVER(ClockObserver, clock_observers_, | 58 FOR_EACH_OBSERVER(ClockObserver, clock_observers_, |
| 59 OnSystemClockTimeUpdated()); | 59 OnSystemClockTimeUpdated()); |
| 60 } | 60 } |
| 61 | 61 |
| 62 void WmSystemTrayNotifier::NotifySystemClockCanSetTimeChanged( | 62 void WmSystemTrayNotifier::NotifySystemClockCanSetTimeChanged( |
| 63 bool can_set_time) { | 63 bool can_set_time) { |
| 64 FOR_EACH_OBSERVER(ClockObserver, clock_observers_, | 64 FOR_EACH_OBSERVER(ClockObserver, clock_observers_, |
| 65 OnSystemClockCanSetTimeChanged(can_set_time)); | 65 OnSystemClockCanSetTimeChanged(can_set_time)); |
| 66 } | 66 } |
| 67 | 67 |
| 68 void WmSystemTrayNotifier::NotifyUpdateRecommended(const UpdateInfo& info) { | 68 void WmSystemTrayNotifier::NotifyUpdateRecommended(const UpdateInfo& info) { |
| 69 FOR_EACH_OBSERVER(UpdateObserver, update_observers_, | 69 FOR_EACH_OBSERVER(UpdateObserver, update_observers_, |
| 70 OnUpdateRecommended(info)); | 70 OnUpdateRecommended(info)); |
| 71 } | 71 } |
| 72 | 72 |
| 73 } // namespace ash | 73 } // namespace ash |
| OLD | NEW |