| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 ~SystemTray() override; | 44 ~SystemTray() override; |
| 45 | 45 |
| 46 // Calls TrayBackgroundView::Initialize(), creates the tray items, and | 46 // Calls TrayBackgroundView::Initialize(), creates the tray items, and |
| 47 // adds them to SystemTrayNotifier. | 47 // adds them to SystemTrayNotifier. |
| 48 void InitializeTrayItems(SystemTrayDelegate* delegate, | 48 void InitializeTrayItems(SystemTrayDelegate* delegate, |
| 49 WebNotificationTray* web_notification_tray); | 49 WebNotificationTray* web_notification_tray); |
| 50 | 50 |
| 51 // Resets internal pointers. | 51 // Resets internal pointers. |
| 52 void Shutdown(); | 52 void Shutdown(); |
| 53 | 53 |
| 54 // Adds a new item in the tray. | 54 // Adds a new item in the tray. Takes ownership. |
| 55 void AddTrayItem(SystemTrayItem* item); | 55 void AddTrayItem(SystemTrayItem* item); |
| 56 | 56 |
| 57 // Removes an existing tray item. | |
| 58 void RemoveTrayItem(SystemTrayItem* item); | |
| 59 | |
| 60 // Returns all tray items that has been added to system tray. | 57 // Returns all tray items that has been added to system tray. |
| 61 const std::vector<SystemTrayItem*>& GetTrayItems() const; | 58 const std::vector<SystemTrayItem*>& GetTrayItems() const; |
| 62 | 59 |
| 63 // Shows the default view of all items. | 60 // Shows the default view of all items. |
| 64 void ShowDefaultView(BubbleCreationType creation_type); | 61 void ShowDefaultView(BubbleCreationType creation_type); |
| 65 | 62 |
| 66 // Shows default view that ingnores outside clicks and activation loss. | 63 // Shows default view that ingnores outside clicks and activation loss. |
| 67 void ShowPersistentDefaultView(); | 64 void ShowPersistentDefaultView(); |
| 68 | 65 |
| 69 // Shows details of a particular item. If |close_delay_in_seconds| is | 66 // Shows details of a particular item. If |close_delay_in_seconds| is |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 // A reference to the Screen share and capture item. | 255 // A reference to the Screen share and capture item. |
| 259 ScreenTrayItem* screen_capture_tray_item_; // not owned | 256 ScreenTrayItem* screen_capture_tray_item_; // not owned |
| 260 ScreenTrayItem* screen_share_tray_item_; // not owned | 257 ScreenTrayItem* screen_share_tray_item_; // not owned |
| 261 | 258 |
| 262 DISALLOW_COPY_AND_ASSIGN(SystemTray); | 259 DISALLOW_COPY_AND_ASSIGN(SystemTray); |
| 263 }; | 260 }; |
| 264 | 261 |
| 265 } // namespace ash | 262 } // namespace ash |
| 266 | 263 |
| 267 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ | 264 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ |
| OLD | NEW |