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

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

Issue 2060633002: mash: Introduce WmSystemTrayNotifier for //ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@testupdate
Patch Set: rebase Created 4 years, 6 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
« no previous file with comments | « ash/common/wm_shell.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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "ash/ash_export.h" 13 #include "ash/ash_export.h"
14 #include "ash/common/system/update/update_observer.h"
15 #include "ash/system/audio/audio_observer.h" 14 #include "ash/system/audio/audio_observer.h"
16 #include "ash/system/chromeos/tray_tracing.h" 15 #include "ash/system/chromeos/tray_tracing.h"
17 #include "ash/system/date/clock_observer.h" 16 #include "ash/system/date/clock_observer.h"
18 #include "ash/system/ime/ime_observer.h" 17 #include "ash/system/ime/ime_observer.h"
19 #include "ash/system/locale/locale_observer.h" 18 #include "ash/system/locale/locale_observer.h"
20 #include "ash/system/tray_accessibility.h" 19 #include "ash/system/tray_accessibility.h"
21 #include "ash/system/user/user_observer.h" 20 #include "ash/system/user/user_observer.h"
22 #include "base/macros.h" 21 #include "base/macros.h"
23 #include "base/observer_list.h" 22 #include "base/observer_list.h"
24 23
25 #if defined(OS_CHROMEOS) 24 #if defined(OS_CHROMEOS)
26 #include "ash/system/chromeos/bluetooth/bluetooth_observer.h" 25 #include "ash/system/chromeos/bluetooth/bluetooth_observer.h"
27 #include "ash/system/chromeos/enterprise/enterprise_domain_observer.h" 26 #include "ash/system/chromeos/enterprise/enterprise_domain_observer.h"
28 #include "ash/system/chromeos/network/network_observer.h" 27 #include "ash/system/chromeos/network/network_observer.h"
29 #include "ash/system/chromeos/network/network_portal_detector_observer.h" 28 #include "ash/system/chromeos/network/network_portal_detector_observer.h"
30 #include "ash/system/chromeos/screen_security/screen_capture_observer.h" 29 #include "ash/system/chromeos/screen_security/screen_capture_observer.h"
31 #include "ash/system/chromeos/screen_security/screen_share_observer.h" 30 #include "ash/system/chromeos/screen_security/screen_share_observer.h"
32 #include "ash/system/chromeos/session/last_window_closed_observer.h" 31 #include "ash/system/chromeos/session/last_window_closed_observer.h"
33 #include "ash/system/chromeos/session/logout_button_observer.h" 32 #include "ash/system/chromeos/session/logout_button_observer.h"
34 #include "ash/system/chromeos/session/session_length_limit_observer.h" 33 #include "ash/system/chromeos/session/session_length_limit_observer.h"
35 #include "ash/system/chromeos/virtual_keyboard/virtual_keyboard_observer.h" 34 #include "ash/system/chromeos/virtual_keyboard/virtual_keyboard_observer.h"
36 #include "ash/system/tray/media_security/media_capture_observer.h" 35 #include "ash/system/tray/media_security/media_capture_observer.h"
37 #include "base/time/time.h" 36 #include "base/time/time.h"
38 #endif 37 #endif
39 38
40 namespace ash { 39 namespace ash {
41 40
42 struct UpdateInfo;
43
44 #if defined(OS_CHROMEOS) 41 #if defined(OS_CHROMEOS)
45 class NetworkStateNotifier; 42 class NetworkStateNotifier;
46 #endif 43 #endif
47 44
48 class ASH_EXPORT SystemTrayNotifier { 45 class ASH_EXPORT SystemTrayNotifier {
49 public: 46 public:
50 SystemTrayNotifier(); 47 SystemTrayNotifier();
51 ~SystemTrayNotifier(); 48 ~SystemTrayNotifier();
52 49
53 void AddAccessibilityObserver(AccessibilityObserver* observer); 50 void AddAccessibilityObserver(AccessibilityObserver* observer);
54 void RemoveAccessibilityObserver(AccessibilityObserver* observer); 51 void RemoveAccessibilityObserver(AccessibilityObserver* observer);
55 52
56 void AddAudioObserver(AudioObserver* observer); 53 void AddAudioObserver(AudioObserver* observer);
57 void RemoveAudioObserver(AudioObserver* observer); 54 void RemoveAudioObserver(AudioObserver* observer);
58 55
59 void AddClockObserver(ClockObserver* observer); 56 void AddClockObserver(ClockObserver* observer);
60 void RemoveClockObserver(ClockObserver* observer); 57 void RemoveClockObserver(ClockObserver* observer);
61 58
62 void AddIMEObserver(IMEObserver* observer); 59 void AddIMEObserver(IMEObserver* observer);
63 void RemoveIMEObserver(IMEObserver* observer); 60 void RemoveIMEObserver(IMEObserver* observer);
64 61
65 void AddLocaleObserver(LocaleObserver* observer); 62 void AddLocaleObserver(LocaleObserver* observer);
66 void RemoveLocaleObserver(LocaleObserver* observer); 63 void RemoveLocaleObserver(LocaleObserver* observer);
67 64
68 void AddTracingObserver(TracingObserver* observer); 65 void AddTracingObserver(TracingObserver* observer);
69 void RemoveTracingObserver(TracingObserver* observer); 66 void RemoveTracingObserver(TracingObserver* observer);
70 67
71 void AddUpdateObserver(UpdateObserver* observer);
72 void RemoveUpdateObserver(UpdateObserver* observer);
73
74 void AddUserObserver(UserObserver* observer); 68 void AddUserObserver(UserObserver* observer);
75 void RemoveUserObserver(UserObserver* observer); 69 void RemoveUserObserver(UserObserver* observer);
76 70
77 #if defined(OS_CHROMEOS) 71 #if defined(OS_CHROMEOS)
78 void AddBluetoothObserver(BluetoothObserver* observer); 72 void AddBluetoothObserver(BluetoothObserver* observer);
79 void RemoveBluetoothObserver(BluetoothObserver* observer); 73 void RemoveBluetoothObserver(BluetoothObserver* observer);
80 74
81 void AddLogoutButtonObserver(LogoutButtonObserver* observer); 75 void AddLogoutButtonObserver(LogoutButtonObserver* observer);
82 void RemoveLogoutButtonObserver(LogoutButtonObserver* observer); 76 void RemoveLogoutButtonObserver(LogoutButtonObserver* observer);
83 77
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 void NotifyRefreshClock(); 116 void NotifyRefreshClock();
123 void NotifyDateFormatChanged(); 117 void NotifyDateFormatChanged();
124 void NotifySystemClockTimeUpdated(); 118 void NotifySystemClockTimeUpdated();
125 void NotifySystemClockCanSetTimeChanged(bool can_set_time); 119 void NotifySystemClockCanSetTimeChanged(bool can_set_time);
126 void NotifyRefreshIME(); 120 void NotifyRefreshIME();
127 void NotifyRefreshIMEMenu(bool is_active); 121 void NotifyRefreshIMEMenu(bool is_active);
128 void NotifyLocaleChanged(LocaleObserver::Delegate* delegate, 122 void NotifyLocaleChanged(LocaleObserver::Delegate* delegate,
129 const std::string& cur_locale, 123 const std::string& cur_locale,
130 const std::string& from_locale, 124 const std::string& from_locale,
131 const std::string& to_locale); 125 const std::string& to_locale);
132 void NotifyUpdateRecommended(const UpdateInfo& info);
133 void NotifyUserUpdate(); 126 void NotifyUserUpdate();
134 void NotifyUserAddedToSession(); 127 void NotifyUserAddedToSession();
135 #if defined(OS_CHROMEOS) 128 #if defined(OS_CHROMEOS)
136 void NotifyRefreshBluetooth(); 129 void NotifyRefreshBluetooth();
137 void NotifyBluetoothDiscoveringChanged(); 130 void NotifyBluetoothDiscoveringChanged();
138 void NotifyShowLoginButtonChanged(bool show_login_button); 131 void NotifyShowLoginButtonChanged(bool show_login_button);
139 void NotifyLogoutDialogDurationChanged(base::TimeDelta duration); 132 void NotifyLogoutDialogDurationChanged(base::TimeDelta duration);
140 void NotifySessionStartTimeChanged(); 133 void NotifySessionStartTimeChanged();
141 void NotifySessionLengthLimitChanged(); 134 void NotifySessionLengthLimitChanged();
142 void NotifyRequestToggleWifi(); 135 void NotifyRequestToggleWifi();
(...skipping 10 matching lines...) Expand all
153 void NotifyVirtualKeyboardSuppressionChanged(bool suppressed); 146 void NotifyVirtualKeyboardSuppressionChanged(bool suppressed);
154 #endif 147 #endif
155 148
156 private: 149 private:
157 base::ObserverList<AccessibilityObserver> accessibility_observers_; 150 base::ObserverList<AccessibilityObserver> accessibility_observers_;
158 base::ObserverList<AudioObserver> audio_observers_; 151 base::ObserverList<AudioObserver> audio_observers_;
159 base::ObserverList<ClockObserver> clock_observers_; 152 base::ObserverList<ClockObserver> clock_observers_;
160 base::ObserverList<IMEObserver> ime_observers_; 153 base::ObserverList<IMEObserver> ime_observers_;
161 base::ObserverList<LocaleObserver> locale_observers_; 154 base::ObserverList<LocaleObserver> locale_observers_;
162 base::ObserverList<TracingObserver> tracing_observers_; 155 base::ObserverList<TracingObserver> tracing_observers_;
163 base::ObserverList<UpdateObserver> update_observers_;
164 base::ObserverList<UserObserver> user_observers_; 156 base::ObserverList<UserObserver> user_observers_;
165 #if defined(OS_CHROMEOS) 157 #if defined(OS_CHROMEOS)
166 base::ObserverList<BluetoothObserver> bluetooth_observers_; 158 base::ObserverList<BluetoothObserver> bluetooth_observers_;
167 base::ObserverList<LogoutButtonObserver> logout_button_observers_; 159 base::ObserverList<LogoutButtonObserver> logout_button_observers_;
168 base::ObserverList<SessionLengthLimitObserver> 160 base::ObserverList<SessionLengthLimitObserver>
169 session_length_limit_observers_; 161 session_length_limit_observers_;
170 base::ObserverList<NetworkObserver> network_observers_; 162 base::ObserverList<NetworkObserver> network_observers_;
171 base::ObserverList<NetworkPortalDetectorObserver> 163 base::ObserverList<NetworkPortalDetectorObserver>
172 network_portal_detector_observers_; 164 network_portal_detector_observers_;
173 base::ObserverList<EnterpriseDomainObserver> enterprise_domain_observers_; 165 base::ObserverList<EnterpriseDomainObserver> enterprise_domain_observers_;
174 base::ObserverList<MediaCaptureObserver> media_capture_observers_; 166 base::ObserverList<MediaCaptureObserver> media_capture_observers_;
175 base::ObserverList<ScreenCaptureObserver> screen_capture_observers_; 167 base::ObserverList<ScreenCaptureObserver> screen_capture_observers_;
176 base::ObserverList<ScreenShareObserver> screen_share_observers_; 168 base::ObserverList<ScreenShareObserver> screen_share_observers_;
177 base::ObserverList<LastWindowClosedObserver> last_window_closed_observers_; 169 base::ObserverList<LastWindowClosedObserver> last_window_closed_observers_;
178 base::ObserverList<VirtualKeyboardObserver> virtual_keyboard_observers_; 170 base::ObserverList<VirtualKeyboardObserver> virtual_keyboard_observers_;
179 #endif 171 #endif
180 172
181 DISALLOW_COPY_AND_ASSIGN(SystemTrayNotifier); 173 DISALLOW_COPY_AND_ASSIGN(SystemTrayNotifier);
182 }; 174 };
183 175
184 } // namespace ash 176 } // namespace ash
185 177
186 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_ 178 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_
OLDNEW
« no previous file with comments | « ash/common/wm_shell.cc ('k') | ash/system/tray/system_tray_notifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698