| 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 #ifndef ASH_COMMON_SYSTEM_TRAY_WM_SYSTEM_TRAY_NOTIFIER_H_ | 5 #ifndef ASH_COMMON_SYSTEM_TRAY_WM_SYSTEM_TRAY_NOTIFIER_H_ |
| 6 #define ASH_COMMON_SYSTEM_TRAY_WM_SYSTEM_TRAY_NOTIFIER_H_ | 6 #define ASH_COMMON_SYSTEM_TRAY_WM_SYSTEM_TRAY_NOTIFIER_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/common/accessibility_types.h" | 9 #include "ash/common/accessibility_types.h" |
| 10 #include "ash/common/system/locale/locale_observer.h" | 10 #include "ash/common/system/locale/locale_observer.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/observer_list.h" | 12 #include "base/observer_list.h" |
| 13 | 13 |
| 14 namespace ash { | 14 namespace ash { |
| 15 | 15 |
| 16 class AccessibilityObserver; | 16 class AccessibilityObserver; |
| 17 class AudioObserver; |
| 17 class ClockObserver; | 18 class ClockObserver; |
| 18 class IMEObserver; | 19 class IMEObserver; |
| 19 struct UpdateInfo; | 20 struct UpdateInfo; |
| 20 class UpdateObserver; | 21 class UpdateObserver; |
| 21 | 22 |
| 22 #if defined(OS_CHROMEOS) | 23 #if defined(OS_CHROMEOS) |
| 23 class VirtualKeyboardObserver; | 24 class VirtualKeyboardObserver; |
| 24 #endif | 25 #endif |
| 25 | 26 |
| 26 // Observer and notification manager for the ash system tray. This version | 27 // Observer and notification manager for the ash system tray. This version |
| 27 // contains the observers that have been ported to //ash/common. See also | 28 // contains the observers that have been ported to //ash/common. See also |
| 28 // ash::SystemTrayNotifier. | 29 // ash::SystemTrayNotifier. |
| 29 // TODO(jamescook): After all the observers have been moved, rename this class | 30 // TODO(jamescook): After all the observers have been moved, rename this class |
| 30 // to SystemTrayNotifier. | 31 // to SystemTrayNotifier. |
| 31 class ASH_EXPORT WmSystemTrayNotifier { | 32 class ASH_EXPORT WmSystemTrayNotifier { |
| 32 public: | 33 public: |
| 33 WmSystemTrayNotifier(); | 34 WmSystemTrayNotifier(); |
| 34 ~WmSystemTrayNotifier(); | 35 ~WmSystemTrayNotifier(); |
| 35 | 36 |
| 36 // Accessibility. | 37 // Accessibility. |
| 37 void AddAccessibilityObserver(AccessibilityObserver* observer); | 38 void AddAccessibilityObserver(AccessibilityObserver* observer); |
| 38 void RemoveAccessibilityObserver(AccessibilityObserver* observer); | 39 void RemoveAccessibilityObserver(AccessibilityObserver* observer); |
| 39 void NotifyAccessibilityModeChanged( | 40 void NotifyAccessibilityModeChanged( |
| 40 AccessibilityNotificationVisibility notify); | 41 AccessibilityNotificationVisibility notify); |
| 41 | 42 |
| 43 // Audio. |
| 44 void AddAudioObserver(AudioObserver* observer); |
| 45 void RemoveAudioObserver(AudioObserver* observer); |
| 46 void NotifyAudioOutputVolumeChanged(uint64_t node_id, double volume); |
| 47 void NotifyAudioOutputMuteChanged(bool mute_on, bool system_adjust); |
| 48 void NotifyAudioNodesChanged(); |
| 49 void NotifyAudioActiveOutputNodeChanged(); |
| 50 void NotifyAudioActiveInputNodeChanged(); |
| 51 |
| 42 // Date and time. | 52 // Date and time. |
| 43 void AddClockObserver(ClockObserver* observer); | 53 void AddClockObserver(ClockObserver* observer); |
| 44 void RemoveClockObserver(ClockObserver* observer); | 54 void RemoveClockObserver(ClockObserver* observer); |
| 45 void NotifyRefreshClock(); | 55 void NotifyRefreshClock(); |
| 46 void NotifyDateFormatChanged(); | 56 void NotifyDateFormatChanged(); |
| 47 void NotifySystemClockTimeUpdated(); | 57 void NotifySystemClockTimeUpdated(); |
| 48 void NotifySystemClockCanSetTimeChanged(bool can_set_time); | 58 void NotifySystemClockCanSetTimeChanged(bool can_set_time); |
| 49 | 59 |
| 50 // Input methods. | 60 // Input methods. |
| 51 void AddIMEObserver(IMEObserver* observer); | 61 void AddIMEObserver(IMEObserver* observer); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 68 | 78 |
| 69 #if defined(OS_CHROMEOS) | 79 #if defined(OS_CHROMEOS) |
| 70 // Virtual keyboard. | 80 // Virtual keyboard. |
| 71 void AddVirtualKeyboardObserver(VirtualKeyboardObserver* observer); | 81 void AddVirtualKeyboardObserver(VirtualKeyboardObserver* observer); |
| 72 void RemoveVirtualKeyboardObserver(VirtualKeyboardObserver* observer); | 82 void RemoveVirtualKeyboardObserver(VirtualKeyboardObserver* observer); |
| 73 void NotifyVirtualKeyboardSuppressionChanged(bool suppressed); | 83 void NotifyVirtualKeyboardSuppressionChanged(bool suppressed); |
| 74 #endif | 84 #endif |
| 75 | 85 |
| 76 private: | 86 private: |
| 77 base::ObserverList<AccessibilityObserver> accessibility_observers_; | 87 base::ObserverList<AccessibilityObserver> accessibility_observers_; |
| 88 base::ObserverList<AudioObserver> audio_observers_; |
| 78 base::ObserverList<ClockObserver> clock_observers_; | 89 base::ObserverList<ClockObserver> clock_observers_; |
| 79 base::ObserverList<IMEObserver> ime_observers_; | 90 base::ObserverList<IMEObserver> ime_observers_; |
| 80 base::ObserverList<LocaleObserver> locale_observers_; | 91 base::ObserverList<LocaleObserver> locale_observers_; |
| 81 base::ObserverList<UpdateObserver> update_observers_; | 92 base::ObserverList<UpdateObserver> update_observers_; |
| 82 | 93 |
| 83 #if defined(OS_CHROMEOS) | 94 #if defined(OS_CHROMEOS) |
| 84 base::ObserverList<VirtualKeyboardObserver> virtual_keyboard_observers_; | 95 base::ObserverList<VirtualKeyboardObserver> virtual_keyboard_observers_; |
| 85 #endif | 96 #endif |
| 86 | 97 |
| 87 DISALLOW_COPY_AND_ASSIGN(WmSystemTrayNotifier); | 98 DISALLOW_COPY_AND_ASSIGN(WmSystemTrayNotifier); |
| 88 }; | 99 }; |
| 89 | 100 |
| 90 } // namespace ash | 101 } // namespace ash |
| 91 | 102 |
| 92 #endif // ASH_COMMON_SYSTEM_TRAY_WM_SYSTEM_TRAY_NOTIFIER_H_ | 103 #endif // ASH_COMMON_SYSTEM_TRAY_WM_SYSTEM_TRAY_NOTIFIER_H_ |
| OLD | NEW |