OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_ | 5 #ifndef ASH_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_ |
6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_ | 6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "ash/ash_export.h" | 11 #include "ash/ash_export.h" |
| 12 #include "ash/system/audio/audio_observer.h" |
12 #include "ash/system/bluetooth/bluetooth_observer.h" | 13 #include "ash/system/bluetooth/bluetooth_observer.h" |
13 #include "ash/system/chromeos/tray_tracing.h" | 14 #include "ash/system/chromeos/tray_tracing.h" |
14 #include "ash/system/date/clock_observer.h" | 15 #include "ash/system/date/clock_observer.h" |
15 #include "ash/system/drive/drive_observer.h" | 16 #include "ash/system/drive/drive_observer.h" |
16 #include "ash/system/ime/ime_observer.h" | 17 #include "ash/system/ime/ime_observer.h" |
17 #include "ash/system/locale/locale_observer.h" | 18 #include "ash/system/locale/locale_observer.h" |
18 #include "ash/system/logout_button/logout_button_observer.h" | 19 #include "ash/system/logout_button/logout_button_observer.h" |
19 #include "ash/system/session_length_limit/session_length_limit_observer.h" | 20 #include "ash/system/session_length_limit/session_length_limit_observer.h" |
20 #include "ash/system/tray_accessibility.h" | 21 #include "ash/system/tray_accessibility.h" |
21 #include "ash/system/tray_caps_lock.h" | 22 #include "ash/system/tray_caps_lock.h" |
22 #include "ash/system/user/update_observer.h" | 23 #include "ash/system/user/update_observer.h" |
23 #include "ash/system/user/user_observer.h" | 24 #include "ash/system/user/user_observer.h" |
24 #include "base/observer_list.h" | 25 #include "base/observer_list.h" |
25 #include "base/time/time.h" | 26 #include "base/time/time.h" |
26 | 27 |
27 #if defined(OS_CHROMEOS) | 28 #if defined(OS_CHROMEOS) |
28 #include "ash/system/chromeos/enterprise/enterprise_domain_observer.h" | 29 #include "ash/system/chromeos/enterprise/enterprise_domain_observer.h" |
29 #include "ash/system/chromeos/network/network_observer.h" | 30 #include "ash/system/chromeos/network/network_observer.h" |
30 #include "ash/system/chromeos/screen_security/screen_capture_observer.h" | 31 #include "ash/system/chromeos/screen_security/screen_capture_observer.h" |
31 #include "ash/system/chromeos/screen_security/screen_share_observer.h" | 32 #include "ash/system/chromeos/screen_security/screen_share_observer.h" |
32 #endif | 33 #endif |
33 | 34 |
34 namespace ash { | 35 namespace ash { |
35 | 36 |
36 #if defined(OS_CHROMEOS) | 37 #if defined(OS_CHROMEOS) |
37 class NetworkStateNotifier; | 38 class NetworkStateNotifier; |
38 #endif | 39 #endif |
39 | 40 |
40 class ASH_EXPORT SystemTrayNotifier { | 41 class ASH_EXPORT SystemTrayNotifier { |
41 public: | 42 public: |
42 SystemTrayNotifier(); | 43 SystemTrayNotifier(); |
43 ~SystemTrayNotifier(); | 44 ~SystemTrayNotifier(); |
44 | 45 |
45 void AddAccessibilityObserver(AccessibilityObserver* observer); | 46 void AddAccessibilityObserver(AccessibilityObserver* observer); |
46 void RemoveAccessibilityObserver(AccessibilityObserver* observer); | 47 void RemoveAccessibilityObserver(AccessibilityObserver* observer); |
47 | 48 |
| 49 void AddAudioObserver(AudioObserver* observer); |
| 50 void RemoveAudioObserver(AudioObserver* observer); |
| 51 |
48 void AddBluetoothObserver(BluetoothObserver* observer); | 52 void AddBluetoothObserver(BluetoothObserver* observer); |
49 void RemoveBluetoothObserver(BluetoothObserver* observer); | 53 void RemoveBluetoothObserver(BluetoothObserver* observer); |
50 | 54 |
51 void AddCapsLockObserver(CapsLockObserver* observer); | 55 void AddCapsLockObserver(CapsLockObserver* observer); |
52 void RemoveCapsLockObserver(CapsLockObserver* observer); | 56 void RemoveCapsLockObserver(CapsLockObserver* observer); |
53 | 57 |
54 void AddClockObserver(ClockObserver* observer); | 58 void AddClockObserver(ClockObserver* observer); |
55 void RemoveClockObserver(ClockObserver* observer); | 59 void RemoveClockObserver(ClockObserver* observer); |
56 | 60 |
57 void AddDriveObserver(DriveObserver* observer); | 61 void AddDriveObserver(DriveObserver* observer); |
(...skipping 29 matching lines...) Expand all Loading... |
87 | 91 |
88 void AddScreenCaptureObserver(ScreenCaptureObserver* observer); | 92 void AddScreenCaptureObserver(ScreenCaptureObserver* observer); |
89 void RemoveScreenCaptureObserver(ScreenCaptureObserver* observer); | 93 void RemoveScreenCaptureObserver(ScreenCaptureObserver* observer); |
90 | 94 |
91 void AddScreenShareObserver(ScreenShareObserver* observer); | 95 void AddScreenShareObserver(ScreenShareObserver* observer); |
92 void RemoveScreenShareObserver(ScreenShareObserver* observer); | 96 void RemoveScreenShareObserver(ScreenShareObserver* observer); |
93 #endif | 97 #endif |
94 | 98 |
95 void NotifyAccessibilityModeChanged( | 99 void NotifyAccessibilityModeChanged( |
96 AccessibilityNotificationVisibility notify); | 100 AccessibilityNotificationVisibility notify); |
| 101 void NotifyAudioOutputVolumeChanged(); |
| 102 void NotifyAudioOutputMuteChanged(); |
| 103 void NotifyAudioNodesChanged(); |
| 104 void NotifyAudioActiveOutputNodeChanged(); |
| 105 void NotifyAudioActiveInputNodeChanged(); |
97 void NotifyTracingModeChanged(bool value); | 106 void NotifyTracingModeChanged(bool value); |
98 void NotifyRefreshBluetooth(); | 107 void NotifyRefreshBluetooth(); |
99 void NotifyBluetoothDiscoveringChanged(); | 108 void NotifyBluetoothDiscoveringChanged(); |
100 void NotifyCapsLockChanged(bool enabled, bool search_mapped_to_caps_lock); | 109 void NotifyCapsLockChanged(bool enabled, bool search_mapped_to_caps_lock); |
101 void NotifyRefreshClock(); | 110 void NotifyRefreshClock(); |
102 void NotifyDateFormatChanged(); | 111 void NotifyDateFormatChanged(); |
103 void NotifySystemClockTimeUpdated(); | 112 void NotifySystemClockTimeUpdated(); |
104 void NotifyDriveJobUpdated(const DriveOperationStatus& status); | 113 void NotifyDriveJobUpdated(const DriveOperationStatus& status); |
105 void NotifyRefreshIME(bool show_message); | 114 void NotifyRefreshIME(bool show_message); |
106 void NotifyShowLoginButtonChanged(bool show_login_button); | 115 void NotifyShowLoginButtonChanged(bool show_login_button); |
(...skipping 17 matching lines...) Expand all Loading... |
124 const base::string16& helper_name); | 133 const base::string16& helper_name); |
125 void NotifyScreenShareStop(); | 134 void NotifyScreenShareStop(); |
126 | 135 |
127 NetworkStateNotifier* network_state_notifier() { | 136 NetworkStateNotifier* network_state_notifier() { |
128 return network_state_notifier_.get(); | 137 return network_state_notifier_.get(); |
129 } | 138 } |
130 #endif | 139 #endif |
131 | 140 |
132 private: | 141 private: |
133 ObserverList<AccessibilityObserver> accessibility_observers_; | 142 ObserverList<AccessibilityObserver> accessibility_observers_; |
| 143 ObserverList<AudioObserver> audio_observers_; |
134 ObserverList<BluetoothObserver> bluetooth_observers_; | 144 ObserverList<BluetoothObserver> bluetooth_observers_; |
135 ObserverList<CapsLockObserver> caps_lock_observers_; | 145 ObserverList<CapsLockObserver> caps_lock_observers_; |
136 ObserverList<ClockObserver> clock_observers_; | 146 ObserverList<ClockObserver> clock_observers_; |
137 ObserverList<DriveObserver> drive_observers_; | 147 ObserverList<DriveObserver> drive_observers_; |
138 ObserverList<IMEObserver> ime_observers_; | 148 ObserverList<IMEObserver> ime_observers_; |
139 ObserverList<LocaleObserver> locale_observers_; | 149 ObserverList<LocaleObserver> locale_observers_; |
140 ObserverList<LogoutButtonObserver> logout_button_observers_; | 150 ObserverList<LogoutButtonObserver> logout_button_observers_; |
141 ObserverList<SessionLengthLimitObserver> session_length_limit_observers_; | 151 ObserverList<SessionLengthLimitObserver> session_length_limit_observers_; |
142 ObserverList<TracingObserver> tracing_observers_; | 152 ObserverList<TracingObserver> tracing_observers_; |
143 ObserverList<UpdateObserver> update_observers_; | 153 ObserverList<UpdateObserver> update_observers_; |
144 ObserverList<UserObserver> user_observers_; | 154 ObserverList<UserObserver> user_observers_; |
145 #if defined(OS_CHROMEOS) | 155 #if defined(OS_CHROMEOS) |
146 ObserverList<NetworkObserver> network_observers_; | 156 ObserverList<NetworkObserver> network_observers_; |
147 ObserverList<EnterpriseDomainObserver> enterprise_domain_observers_; | 157 ObserverList<EnterpriseDomainObserver> enterprise_domain_observers_; |
148 ObserverList<ScreenCaptureObserver> screen_capture_observers_; | 158 ObserverList<ScreenCaptureObserver> screen_capture_observers_; |
149 ObserverList<ScreenShareObserver> screen_share_observers_; | 159 ObserverList<ScreenShareObserver> screen_share_observers_; |
150 scoped_ptr<NetworkStateNotifier> network_state_notifier_; | 160 scoped_ptr<NetworkStateNotifier> network_state_notifier_; |
151 #endif | 161 #endif |
152 | 162 |
153 DISALLOW_COPY_AND_ASSIGN(SystemTrayNotifier); | 163 DISALLOW_COPY_AND_ASSIGN(SystemTrayNotifier); |
154 }; | 164 }; |
155 | 165 |
156 } // namespace ash | 166 } // namespace ash |
157 | 167 |
158 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_ | 168 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_ |
OLD | NEW |