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

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

Issue 2734653002: chromeos: Move files in //ash/common to //ash (Closed)
Patch Set: fix a11y tests, fix docs Created 3 years, 9 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_
6 #define ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_
7
8 #include <string>
9
10 #include "ash/ash_export.h"
11 #include "ash/common/accessibility_types.h"
12 #include "base/callback_forward.h"
13 #include "base/macros.h"
14 #include "base/observer_list.h"
15 #include "base/strings/string16.h"
16 #include "base/time/time.h"
17
18 namespace ash {
19
20 class AccessibilityObserver;
21 class BluetoothObserver;
22 class ClockObserver;
23 class EnterpriseDomainObserver;
24 class IMEObserver;
25 class LastWindowClosedObserver;
26 class LogoutButtonObserver;
27 class NetworkObserver;
28 class NetworkPortalDetectorObserver;
29 class ScreenCaptureObserver;
30 class ScreenShareObserver;
31 class SessionLengthLimitObserver;
32 class TracingObserver;
33 class UserObserver;
34 class VirtualKeyboardObserver;
35
36 namespace mojom {
37 enum class UpdateSeverity;
38 }
39
40 // Observer and notification manager for the ash system tray.
41 class ASH_EXPORT SystemTrayNotifier {
42 public:
43 SystemTrayNotifier();
44 ~SystemTrayNotifier();
45
46 // Accessibility.
47 void AddAccessibilityObserver(AccessibilityObserver* observer);
48 void RemoveAccessibilityObserver(AccessibilityObserver* observer);
49 void NotifyAccessibilityModeChanged(
50 AccessibilityNotificationVisibility notify);
51
52 // Bluetooth.
53 void AddBluetoothObserver(BluetoothObserver* observer);
54 void RemoveBluetoothObserver(BluetoothObserver* observer);
55 void NotifyRefreshBluetooth();
56 void NotifyBluetoothDiscoveringChanged();
57
58 // Date and time.
59 void AddClockObserver(ClockObserver* observer);
60 void RemoveClockObserver(ClockObserver* observer);
61 void NotifyRefreshClock();
62 void NotifyDateFormatChanged();
63 void NotifySystemClockTimeUpdated();
64 void NotifySystemClockCanSetTimeChanged(bool can_set_time);
65
66 // Enterprise domain.
67 void AddEnterpriseDomainObserver(EnterpriseDomainObserver* observer);
68 void RemoveEnterpriseDomainObserver(EnterpriseDomainObserver* observer);
69 void NotifyEnterpriseDomainChanged();
70
71 // Input methods.
72 void AddIMEObserver(IMEObserver* observer);
73 void RemoveIMEObserver(IMEObserver* observer);
74 void NotifyRefreshIME();
75 void NotifyRefreshIMEMenu(bool is_active);
76
77 // Last window closed.
78 void AddLastWindowClosedObserver(LastWindowClosedObserver* observer);
79 void RemoveLastWindowClosedObserver(LastWindowClosedObserver* observer);
80 void NotifyLastWindowClosed();
81
82 // Logout button.
83 void AddLogoutButtonObserver(LogoutButtonObserver* observer);
84 void RemoveLogoutButtonObserver(LogoutButtonObserver* observer);
85 void NotifyShowLoginButtonChanged(bool show_login_button);
86 void NotifyLogoutDialogDurationChanged(base::TimeDelta duration);
87
88 // Network.
89 void AddNetworkObserver(NetworkObserver* observer);
90 void RemoveNetworkObserver(NetworkObserver* observer);
91 void NotifyRequestToggleWifi();
92
93 // Network portal detector.
94 void AddNetworkPortalDetectorObserver(
95 NetworkPortalDetectorObserver* observer);
96 void RemoveNetworkPortalDetectorObserver(
97 NetworkPortalDetectorObserver* observer);
98 void NotifyOnCaptivePortalDetected(const std::string& guid);
99
100 // Screen capture.
101 void AddScreenCaptureObserver(ScreenCaptureObserver* observer);
102 void RemoveScreenCaptureObserver(ScreenCaptureObserver* observer);
103 void NotifyScreenCaptureStart(const base::Closure& stop_callback,
104 const base::string16& sharing_app_name);
105 void NotifyScreenCaptureStop();
106
107 // Screen share.
108 void AddScreenShareObserver(ScreenShareObserver* observer);
109 void RemoveScreenShareObserver(ScreenShareObserver* observer);
110 void NotifyScreenShareStart(const base::Closure& stop_callback,
111 const base::string16& helper_name);
112 void NotifyScreenShareStop();
113
114 // Session length limit.
115 void AddSessionLengthLimitObserver(SessionLengthLimitObserver* observer);
116 void RemoveSessionLengthLimitObserver(SessionLengthLimitObserver* observer);
117 void NotifySessionStartTimeChanged();
118 void NotifySessionLengthLimitChanged();
119
120 // Tracing.
121 void AddTracingObserver(TracingObserver* observer);
122 void RemoveTracingObserver(TracingObserver* observer);
123 void NotifyTracingModeChanged(bool value);
124
125 // User.
126 void AddUserObserver(UserObserver* observer);
127 void RemoveUserObserver(UserObserver* observer);
128 void NotifyUserUpdate();
129 void NotifyUserAddedToSession();
130
131 // Virtual keyboard.
132 void AddVirtualKeyboardObserver(VirtualKeyboardObserver* observer);
133 void RemoveVirtualKeyboardObserver(VirtualKeyboardObserver* observer);
134 void NotifyVirtualKeyboardSuppressionChanged(bool suppressed);
135
136 private:
137 base::ObserverList<AccessibilityObserver> accessibility_observers_;
138 base::ObserverList<BluetoothObserver> bluetooth_observers_;
139 base::ObserverList<ClockObserver> clock_observers_;
140 base::ObserverList<EnterpriseDomainObserver> enterprise_domain_observers_;
141 base::ObserverList<IMEObserver> ime_observers_;
142 base::ObserverList<LastWindowClosedObserver> last_window_closed_observers_;
143 base::ObserverList<LogoutButtonObserver> logout_button_observers_;
144 base::ObserverList<NetworkObserver> network_observers_;
145 base::ObserverList<NetworkPortalDetectorObserver>
146 network_portal_detector_observers_;
147 base::ObserverList<ScreenCaptureObserver> screen_capture_observers_;
148 base::ObserverList<ScreenShareObserver> screen_share_observers_;
149 base::ObserverList<SessionLengthLimitObserver>
150 session_length_limit_observers_;
151 base::ObserverList<TracingObserver> tracing_observers_;
152 base::ObserverList<UserObserver> user_observers_;
153 base::ObserverList<VirtualKeyboardObserver> virtual_keyboard_observers_;
154
155 DISALLOW_COPY_AND_ASSIGN(SystemTrayNotifier);
156 };
157
158 } // namespace ash
159
160 #endif // ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_
OLDNEW
« no previous file with comments | « ash/common/system/tray/system_tray_item.cc ('k') | ash/common/system/tray/system_tray_notifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698