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_H_ | 5 #ifndef ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ |
6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ | 6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <vector> | 10 #include <vector> |
(...skipping 11 matching lines...) Expand all Loading... |
22 enum class LoginStatus; | 22 enum class LoginStatus; |
23 class ScreenTrayItem; | 23 class ScreenTrayItem; |
24 class SystemBubbleWrapper; | 24 class SystemBubbleWrapper; |
25 class SystemTrayDelegate; | 25 class SystemTrayDelegate; |
26 class SystemTrayItem; | 26 class SystemTrayItem; |
27 class TrayAccessibility; | 27 class TrayAccessibility; |
28 class TrayAudio; | 28 class TrayAudio; |
29 class TrayCast; | 29 class TrayCast; |
30 class TrayEnterprise; | 30 class TrayEnterprise; |
31 class TrayNetwork; | 31 class TrayNetwork; |
| 32 class TrayNightLight; |
32 class TraySupervisedUser; | 33 class TraySupervisedUser; |
33 class TraySystemInfo; | 34 class TraySystemInfo; |
34 class TrayTiles; | 35 class TrayTiles; |
35 class TrayUpdate; | 36 class TrayUpdate; |
36 class WebNotificationTray; | 37 class WebNotificationTray; |
37 | 38 |
38 // There are different methods for creating bubble views. | 39 // There are different methods for creating bubble views. |
39 enum BubbleCreationType { | 40 enum BubbleCreationType { |
40 BUBBLE_CREATE_NEW, // Closes any existing bubble and creates a new one. | 41 BUBBLE_CREATE_NEW, // Closes any existing bubble and creates a new one. |
41 BUBBLE_USE_EXISTING, // Uses any existing bubble, or creates a new one. | 42 BUBBLE_USE_EXISTING, // Uses any existing bubble, or creates a new one. |
42 }; | 43 }; |
43 | 44 |
44 class ASH_EXPORT SystemTray : public TrayBackgroundView, | 45 class ASH_EXPORT SystemTray : public TrayBackgroundView, |
45 public views::TrayBubbleView::Delegate { | 46 public views::TrayBubbleView::Delegate { |
46 public: | 47 public: |
47 explicit SystemTray(WmShelf* wm_shelf); | 48 explicit SystemTray(WmShelf* wm_shelf); |
48 ~SystemTray() override; | 49 ~SystemTray() override; |
49 | 50 |
50 TrayUpdate* tray_update() { return tray_update_; } | 51 TrayUpdate* tray_update() { return tray_update_; } |
51 | 52 |
| 53 TrayNightLight* tray_night_light() { return tray_night_light_; } |
| 54 |
52 // Calls TrayBackgroundView::Initialize(), creates the tray items, and | 55 // Calls TrayBackgroundView::Initialize(), creates the tray items, and |
53 // adds them to SystemTrayNotifier. | 56 // adds them to SystemTrayNotifier. |
54 void InitializeTrayItems(SystemTrayDelegate* delegate, | 57 void InitializeTrayItems(SystemTrayDelegate* delegate, |
55 WebNotificationTray* web_notification_tray); | 58 WebNotificationTray* web_notification_tray); |
56 | 59 |
57 // Resets internal pointers. This has to be called before deletion. | 60 // Resets internal pointers. This has to be called before deletion. |
58 void Shutdown(); | 61 void Shutdown(); |
59 | 62 |
60 // Adds a new item in the tray. | 63 // Adds a new item in the tray. |
61 void AddTrayItem(std::unique_ptr<SystemTrayItem> item); | 64 void AddTrayItem(std::unique_ptr<SystemTrayItem> item); |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 // These objects are not owned by this class. | 230 // These objects are not owned by this class. |
228 TrayAccessibility* tray_accessibility_ = nullptr; | 231 TrayAccessibility* tray_accessibility_ = nullptr; |
229 TrayAudio* tray_audio_ = nullptr; | 232 TrayAudio* tray_audio_ = nullptr; |
230 TrayCast* tray_cast_ = nullptr; | 233 TrayCast* tray_cast_ = nullptr; |
231 TrayEnterprise* tray_enterprise_ = nullptr; | 234 TrayEnterprise* tray_enterprise_ = nullptr; |
232 TrayNetwork* tray_network_ = nullptr; | 235 TrayNetwork* tray_network_ = nullptr; |
233 TrayTiles* tray_tiles_ = nullptr; | 236 TrayTiles* tray_tiles_ = nullptr; |
234 TraySupervisedUser* tray_supervised_user_ = nullptr; | 237 TraySupervisedUser* tray_supervised_user_ = nullptr; |
235 TraySystemInfo* tray_system_info_ = nullptr; | 238 TraySystemInfo* tray_system_info_ = nullptr; |
236 TrayUpdate* tray_update_ = nullptr; | 239 TrayUpdate* tray_update_ = nullptr; |
| 240 TrayNightLight* tray_night_light_ = nullptr; |
237 | 241 |
238 // A reference to the Screen share and capture item. | 242 // A reference to the Screen share and capture item. |
239 ScreenTrayItem* screen_capture_tray_item_ = nullptr; // not owned | 243 ScreenTrayItem* screen_capture_tray_item_ = nullptr; // not owned |
240 ScreenTrayItem* screen_share_tray_item_ = nullptr; // not owned | 244 ScreenTrayItem* screen_share_tray_item_ = nullptr; // not owned |
241 | 245 |
242 std::unique_ptr<KeyEventWatcher> key_event_watcher_; | 246 std::unique_ptr<KeyEventWatcher> key_event_watcher_; |
243 | 247 |
244 std::unique_ptr<ActivationObserver> activation_observer_; | 248 std::unique_ptr<ActivationObserver> activation_observer_; |
245 | 249 |
246 DISALLOW_COPY_AND_ASSIGN(SystemTray); | 250 DISALLOW_COPY_AND_ASSIGN(SystemTray); |
247 }; | 251 }; |
248 | 252 |
249 } // namespace ash | 253 } // namespace ash |
250 | 254 |
251 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ | 255 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ |
OLD | NEW |