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