Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: ash/system/tray/system_tray_notifier.h

Issue 14077010: Move ash tray audio UI code from ash/system/audio to ash/system/chromeos/audio. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make audio code CHROMROS only in SystemTrayNotifier. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/system/tray/system_tray.cc ('k') | ash/system/tray/system_tray_notifier.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/brightness/brightness_observer.h" 13 #include "ash/system/brightness/brightness_observer.h"
15 #include "ash/system/chromeos/enterprise/enterprise_domain_observer.h" 14 #include "ash/system/chromeos/enterprise/enterprise_domain_observer.h"
16 #include "ash/system/chromeos/network/network_observer.h" 15 #include "ash/system/chromeos/network/network_observer.h"
17 #include "ash/system/chromeos/network/sms_observer.h" 16 #include "ash/system/chromeos/network/sms_observer.h"
18 #include "ash/system/date/clock_observer.h" 17 #include "ash/system/date/clock_observer.h"
19 #include "ash/system/drive/drive_observer.h" 18 #include "ash/system/drive/drive_observer.h"
20 #include "ash/system/ime/ime_observer.h" 19 #include "ash/system/ime/ime_observer.h"
21 #include "ash/system/locale/locale_observer.h" 20 #include "ash/system/locale/locale_observer.h"
22 #include "ash/system/logout_button/logout_button_observer.h" 21 #include "ash/system/logout_button/logout_button_observer.h"
23 #include "ash/system/power/power_status_observer.h" 22 #include "ash/system/power/power_status_observer.h"
24 #include "ash/system/session_length_limit/session_length_limit_observer.h" 23 #include "ash/system/session_length_limit/session_length_limit_observer.h"
25 #include "ash/system/tray_accessibility.h" 24 #include "ash/system/tray_accessibility.h"
26 #include "ash/system/tray_caps_lock.h" 25 #include "ash/system/tray_caps_lock.h"
27 #include "ash/system/user/update_observer.h" 26 #include "ash/system/user/update_observer.h"
28 #include "ash/system/user/user_observer.h" 27 #include "ash/system/user/user_observer.h"
29 #include "base/observer_list.h" 28 #include "base/observer_list.h"
30 29
31 #if defined(OS_CHROMEOS) 30 #if defined(OS_CHROMEOS)
31 #include "ash/system/chromeos/audio/audio_observer.h"
32 #include "ash/system/chromeos/network/network_observer.h" 32 #include "ash/system/chromeos/network/network_observer.h"
33 #include "ash/system/chromeos/network/sms_observer.h" 33 #include "ash/system/chromeos/network/sms_observer.h"
34 #include "ash/system/chromeos/screen_capture/screen_capture_observer.h" 34 #include "ash/system/chromeos/screen_capture/screen_capture_observer.h"
35 #endif 35 #endif
36 36
37 namespace ash { 37 namespace ash {
38 38
39 class ASH_EXPORT SystemTrayNotifier { 39 class ASH_EXPORT SystemTrayNotifier {
40 public: 40 public:
41 SystemTrayNotifier(); 41 SystemTrayNotifier();
42 ~SystemTrayNotifier(); 42 ~SystemTrayNotifier();
43 43
44 void AddAccessibilityObserver(AccessibilityObserver* observer); 44 void AddAccessibilityObserver(AccessibilityObserver* observer);
45 void RemoveAccessibilityObserver(AccessibilityObserver* observer); 45 void RemoveAccessibilityObserver(AccessibilityObserver* observer);
46 46
47 void AddAudioObserver(AudioObserver* observer);
48 void RemoveAudioObserver(AudioObserver* observer);
49
50 void AddBluetoothObserver(BluetoothObserver* observer); 47 void AddBluetoothObserver(BluetoothObserver* observer);
51 void RemoveBluetoothObserver(BluetoothObserver* observer); 48 void RemoveBluetoothObserver(BluetoothObserver* observer);
52 49
53 void AddBrightnessObserver(BrightnessObserver* observer); 50 void AddBrightnessObserver(BrightnessObserver* observer);
54 void RemoveBrightnessObserver(BrightnessObserver* observer); 51 void RemoveBrightnessObserver(BrightnessObserver* observer);
55 52
56 void AddCapsLockObserver(CapsLockObserver* observer); 53 void AddCapsLockObserver(CapsLockObserver* observer);
57 void RemoveCapsLockObserver(CapsLockObserver* observer); 54 void RemoveCapsLockObserver(CapsLockObserver* observer);
58 55
59 void AddClockObserver(ClockObserver* observer); 56 void AddClockObserver(ClockObserver* observer);
(...skipping 17 matching lines...) Expand all
77 void AddSessionLengthLimitObserver(SessionLengthLimitObserver* observer); 74 void AddSessionLengthLimitObserver(SessionLengthLimitObserver* observer);
78 void RemoveSessionLengthLimitObserver(SessionLengthLimitObserver* observer); 75 void RemoveSessionLengthLimitObserver(SessionLengthLimitObserver* observer);
79 76
80 void AddUpdateObserver(UpdateObserver* observer); 77 void AddUpdateObserver(UpdateObserver* observer);
81 void RemoveUpdateObserver(UpdateObserver* observer); 78 void RemoveUpdateObserver(UpdateObserver* observer);
82 79
83 void AddUserObserver(UserObserver* observer); 80 void AddUserObserver(UserObserver* observer);
84 void RemoveUserObserver(UserObserver* observer); 81 void RemoveUserObserver(UserObserver* observer);
85 82
86 #if defined(OS_CHROMEOS) 83 #if defined(OS_CHROMEOS)
84 void AddAudioObserver(AudioObserver* observer);
85 void RemoveAudioObserver(AudioObserver* observer);
86
87 void AddNetworkObserver(NetworkObserver* observer); 87 void AddNetworkObserver(NetworkObserver* observer);
88 void RemoveNetworkObserver(NetworkObserver* observer); 88 void RemoveNetworkObserver(NetworkObserver* observer);
89 89
90 void AddVpnObserver(NetworkObserver* observer); 90 void AddVpnObserver(NetworkObserver* observer);
91 void RemoveVpnObserver(NetworkObserver* observer); 91 void RemoveVpnObserver(NetworkObserver* observer);
92 92
93 void AddSmsObserver(SmsObserver* observer); 93 void AddSmsObserver(SmsObserver* observer);
94 void RemoveSmsObserver(SmsObserver* observer); 94 void RemoveSmsObserver(SmsObserver* observer);
95 95
96 void AddEnterpriseDomainObserver(EnterpriseDomainObserver* observer); 96 void AddEnterpriseDomainObserver(EnterpriseDomainObserver* observer);
97 void RemoveEnterpriseDomainObserver(EnterpriseDomainObserver* observer); 97 void RemoveEnterpriseDomainObserver(EnterpriseDomainObserver* observer);
98 98
99 void AddScreenCaptureObserver(ScreenCaptureObserver* observer); 99 void AddScreenCaptureObserver(ScreenCaptureObserver* observer);
100 void RemoveScreenCaptureObserver(ScreenCaptureObserver* observer); 100 void RemoveScreenCaptureObserver(ScreenCaptureObserver* observer);
101 #endif 101 #endif
102 102
103 void NotifyAccessibilityModeChanged( 103 void NotifyAccessibilityModeChanged(
104 AccessibilityNotificationVisibility notify); 104 AccessibilityNotificationVisibility notify);
105 void NotifyVolumeChanged(float level);
106 void NotifyMuteToggled();
107 void NotifyRefreshBluetooth(); 105 void NotifyRefreshBluetooth();
108 void NotifyBluetoothDiscoveringChanged(); 106 void NotifyBluetoothDiscoveringChanged();
109 void NotifyBrightnessChanged(double level, bool user_initialted); 107 void NotifyBrightnessChanged(double level, bool user_initialted);
110 void NotifyCapsLockChanged(bool enabled, bool search_mapped_to_caps_lock); 108 void NotifyCapsLockChanged(bool enabled, bool search_mapped_to_caps_lock);
111 void NotifyRefreshClock(); 109 void NotifyRefreshClock();
112 void NotifyDateFormatChanged(); 110 void NotifyDateFormatChanged();
113 void NotifySystemClockTimeUpdated(); 111 void NotifySystemClockTimeUpdated();
114 void NotifyRefreshDrive(DriveOperationStatusList& list); 112 void NotifyRefreshDrive(DriveOperationStatusList& list);
115 void NotifyRefreshIME(bool show_message); 113 void NotifyRefreshIME(bool show_message);
116 void NotifyShowLoginButtonChanged(bool show_login_button); 114 void NotifyShowLoginButtonChanged(bool show_login_button);
117 void NotifyLocaleChanged(LocaleObserver::Delegate* delegate, 115 void NotifyLocaleChanged(LocaleObserver::Delegate* delegate,
118 const std::string& cur_locale, 116 const std::string& cur_locale,
119 const std::string& from_locale, 117 const std::string& from_locale,
120 const std::string& to_locale); 118 const std::string& to_locale);
121 void NotifyPowerStatusChanged(const PowerSupplyStatus& power_status); 119 void NotifyPowerStatusChanged(const PowerSupplyStatus& power_status);
122 void NotifySessionStartTimeChanged(); 120 void NotifySessionStartTimeChanged();
123 void NotifySessionLengthLimitChanged(); 121 void NotifySessionLengthLimitChanged();
124 void NotifyUpdateRecommended(UpdateObserver::UpdateSeverity severity); 122 void NotifyUpdateRecommended(UpdateObserver::UpdateSeverity severity);
125 void NotifyUserUpdate(); 123 void NotifyUserUpdate();
126 #if defined(OS_CHROMEOS) 124 #if defined(OS_CHROMEOS)
125 void NotifyVolumeChanged(float level);
126 void NotifyMuteToggled();
127 void NotifyRefreshNetwork(const NetworkIconInfo &info); 127 void NotifyRefreshNetwork(const NetworkIconInfo &info);
128 void NotifySetNetworkMessage(NetworkTrayDelegate* delegate, 128 void NotifySetNetworkMessage(NetworkTrayDelegate* delegate,
129 NetworkObserver::MessageType message_type, 129 NetworkObserver::MessageType message_type,
130 NetworkObserver::NetworkType network_type, 130 NetworkObserver::NetworkType network_type,
131 const base::string16& title, 131 const base::string16& title,
132 const base::string16& message, 132 const base::string16& message,
133 const std::vector<base::string16>& links); 133 const std::vector<base::string16>& links);
134 void NotifyClearNetworkMessage(NetworkObserver::MessageType message_type); 134 void NotifyClearNetworkMessage(NetworkObserver::MessageType message_type);
135 void NotifyVpnRefreshNetwork(const NetworkIconInfo &info); 135 void NotifyVpnRefreshNetwork(const NetworkIconInfo &info);
136 void NotifyWillToggleWifi(); 136 void NotifyWillToggleWifi();
137 void NotifyAddSmsMessage(const base::DictionaryValue& message); 137 void NotifyAddSmsMessage(const base::DictionaryValue& message);
138 void NotifyEnterpriseDomainChanged(); 138 void NotifyEnterpriseDomainChanged();
139 void NotifyScreenCaptureStart(const base::Closure& stop_callback, 139 void NotifyScreenCaptureStart(const base::Closure& stop_callback,
140 const base::string16& sharing_app_name); 140 const base::string16& sharing_app_name);
141 void NotifyScreenCaptureStop(); 141 void NotifyScreenCaptureStop();
142 #endif 142 #endif
143 143
144 private: 144 private:
145 ObserverList<AccessibilityObserver> accessibility_observers_; 145 ObserverList<AccessibilityObserver> accessibility_observers_;
146 ObserverList<AudioObserver> audio_observers_;
147 ObserverList<BluetoothObserver> bluetooth_observers_; 146 ObserverList<BluetoothObserver> bluetooth_observers_;
148 ObserverList<BrightnessObserver> brightness_observers_; 147 ObserverList<BrightnessObserver> brightness_observers_;
149 ObserverList<CapsLockObserver> caps_lock_observers_; 148 ObserverList<CapsLockObserver> caps_lock_observers_;
150 ObserverList<ClockObserver> clock_observers_; 149 ObserverList<ClockObserver> clock_observers_;
151 ObserverList<DriveObserver> drive_observers_; 150 ObserverList<DriveObserver> drive_observers_;
152 ObserverList<IMEObserver> ime_observers_; 151 ObserverList<IMEObserver> ime_observers_;
153 ObserverList<LocaleObserver> locale_observers_; 152 ObserverList<LocaleObserver> locale_observers_;
154 ObserverList<LogoutButtonObserver> logout_button_observers_; 153 ObserverList<LogoutButtonObserver> logout_button_observers_;
155 ObserverList<PowerStatusObserver> power_status_observers_; 154 ObserverList<PowerStatusObserver> power_status_observers_;
156 ObserverList<SessionLengthLimitObserver> session_length_limit_observers_; 155 ObserverList<SessionLengthLimitObserver> session_length_limit_observers_;
157 ObserverList<UpdateObserver> update_observers_; 156 ObserverList<UpdateObserver> update_observers_;
158 ObserverList<UserObserver> user_observers_; 157 ObserverList<UserObserver> user_observers_;
159 #if defined(OS_CHROMEOS) 158 #if defined(OS_CHROMEOS)
159 ObserverList<AudioObserver> audio_observers_;
160 ObserverList<NetworkObserver> network_observers_; 160 ObserverList<NetworkObserver> network_observers_;
161 ObserverList<NetworkObserver> vpn_observers_; 161 ObserverList<NetworkObserver> vpn_observers_;
162 ObserverList<SmsObserver> sms_observers_; 162 ObserverList<SmsObserver> sms_observers_;
163 ObserverList<EnterpriseDomainObserver> enterprise_domain_observers_; 163 ObserverList<EnterpriseDomainObserver> enterprise_domain_observers_;
164 ObserverList<ScreenCaptureObserver> screen_capture_observers_; 164 ObserverList<ScreenCaptureObserver> screen_capture_observers_;
165 #endif 165 #endif
166 166
167 DISALLOW_COPY_AND_ASSIGN(SystemTrayNotifier); 167 DISALLOW_COPY_AND_ASSIGN(SystemTrayNotifier);
168 }; 168 };
169 169
170 } // namespace ash 170 } // namespace ash
171 171
172 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_ 172 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_
OLDNEW
« no previous file with comments | « ash/system/tray/system_tray.cc ('k') | ash/system/tray/system_tray_notifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698