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

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

Issue 2558043006: ash: Use system tray mojo interface to show system update tray icon (Closed)
Patch Set: Make Flash updates yellow Created 4 years 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_ 5 #ifndef ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_
6 #define ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_ 6 #define ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
11 #include "ash/common/accessibility_types.h" 11 #include "ash/common/accessibility_types.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/observer_list.h" 13 #include "base/observer_list.h"
14 14
15 #if defined(OS_CHROMEOS) 15 #if defined(OS_CHROMEOS)
16 #include "base/strings/string16.h" 16 #include "base/strings/string16.h"
17 #include "base/time/time.h" 17 #include "base/time/time.h"
18 #endif 18 #endif
19 19
20 namespace ash { 20 namespace ash {
21 21
22 class AccessibilityObserver; 22 class AccessibilityObserver;
23 class ClockObserver; 23 class ClockObserver;
24 class IMEObserver; 24 class IMEObserver;
25 struct UpdateInfo;
26 class UpdateObserver; 25 class UpdateObserver;
27 class UserObserver; 26 class UserObserver;
28 27
29 #if defined(OS_CHROMEOS) 28 #if defined(OS_CHROMEOS)
30 class BluetoothObserver; 29 class BluetoothObserver;
31 class EnterpriseDomainObserver; 30 class EnterpriseDomainObserver;
32 class LastWindowClosedObserver; 31 class LastWindowClosedObserver;
33 class LogoutButtonObserver; 32 class LogoutButtonObserver;
34 class MediaCaptureObserver; 33 class MediaCaptureObserver;
35 class NetworkObserver; 34 class NetworkObserver;
36 class NetworkPortalDetectorObserver; 35 class NetworkPortalDetectorObserver;
37 class ScreenCaptureObserver; 36 class ScreenCaptureObserver;
38 class ScreenShareObserver; 37 class ScreenShareObserver;
39 class SessionLengthLimitObserver; 38 class SessionLengthLimitObserver;
40 class TracingObserver; 39 class TracingObserver;
41 class VirtualKeyboardObserver; 40 class VirtualKeyboardObserver;
42 #endif 41 #endif
43 42
43 namespace mojom {
44 enum class UpdateSeverity;
45 }
46
44 // Observer and notification manager for the ash system tray. 47 // Observer and notification manager for the ash system tray.
45 class ASH_EXPORT SystemTrayNotifier { 48 class ASH_EXPORT SystemTrayNotifier {
46 public: 49 public:
47 SystemTrayNotifier(); 50 SystemTrayNotifier();
48 ~SystemTrayNotifier(); 51 ~SystemTrayNotifier();
49 52
50 // Accessibility. 53 // Accessibility.
51 void AddAccessibilityObserver(AccessibilityObserver* observer); 54 void AddAccessibilityObserver(AccessibilityObserver* observer);
52 void RemoveAccessibilityObserver(AccessibilityObserver* observer); 55 void RemoveAccessibilityObserver(AccessibilityObserver* observer);
53 void NotifyAccessibilityModeChanged( 56 void NotifyAccessibilityModeChanged(
54 AccessibilityNotificationVisibility notify); 57 AccessibilityNotificationVisibility notify);
55 58
56 // Date and time. 59 // Date and time.
57 void AddClockObserver(ClockObserver* observer); 60 void AddClockObserver(ClockObserver* observer);
58 void RemoveClockObserver(ClockObserver* observer); 61 void RemoveClockObserver(ClockObserver* observer);
59 void NotifyRefreshClock(); 62 void NotifyRefreshClock();
60 void NotifyDateFormatChanged(); 63 void NotifyDateFormatChanged();
61 void NotifySystemClockTimeUpdated(); 64 void NotifySystemClockTimeUpdated();
62 void NotifySystemClockCanSetTimeChanged(bool can_set_time); 65 void NotifySystemClockCanSetTimeChanged(bool can_set_time);
63 66
64 // Input methods. 67 // Input methods.
65 void AddIMEObserver(IMEObserver* observer); 68 void AddIMEObserver(IMEObserver* observer);
66 void RemoveIMEObserver(IMEObserver* observer); 69 void RemoveIMEObserver(IMEObserver* observer);
67 void NotifyRefreshIME(); 70 void NotifyRefreshIME();
68 void NotifyRefreshIMEMenu(bool is_active); 71 void NotifyRefreshIMEMenu(bool is_active);
69 72
70 // OS updates. 73 // OS updates.
71 void AddUpdateObserver(UpdateObserver* observer); 74 void AddUpdateObserver(UpdateObserver* observer);
72 void RemoveUpdateObserver(UpdateObserver* observer); 75 void RemoveUpdateObserver(UpdateObserver* observer);
73 void NotifyUpdateRecommended(const UpdateInfo& info); 76 void ShowUpdateIcon(mojom::UpdateSeverity severity,
77 bool factory_reset_required);
74 78
75 // User. 79 // User.
76 void AddUserObserver(UserObserver* observer); 80 void AddUserObserver(UserObserver* observer);
77 void RemoveUserObserver(UserObserver* observer); 81 void RemoveUserObserver(UserObserver* observer);
78 void NotifyUserUpdate(); 82 void NotifyUserUpdate();
79 void NotifyUserAddedToSession(); 83 void NotifyUserAddedToSession();
80 84
81 #if defined(OS_CHROMEOS) 85 #if defined(OS_CHROMEOS)
82 // Bluetooth. 86 // Bluetooth.
83 void AddBluetoothObserver(BluetoothObserver* observer); 87 void AddBluetoothObserver(BluetoothObserver* observer);
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 base::ObserverList<TracingObserver> tracing_observers_; 176 base::ObserverList<TracingObserver> tracing_observers_;
173 base::ObserverList<VirtualKeyboardObserver> virtual_keyboard_observers_; 177 base::ObserverList<VirtualKeyboardObserver> virtual_keyboard_observers_;
174 #endif 178 #endif
175 179
176 DISALLOW_COPY_AND_ASSIGN(SystemTrayNotifier); 180 DISALLOW_COPY_AND_ASSIGN(SystemTrayNotifier);
177 }; 181 };
178 182
179 } // namespace ash 183 } // namespace ash
180 184
181 #endif // ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_ 185 #endif // ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698