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 28 matching lines...) Expand all Loading... |
39 | 39 |
40 class ASH_EXPORT SystemTray : public TrayBackgroundView, | 40 class ASH_EXPORT SystemTray : public TrayBackgroundView, |
41 public views::TrayBubbleView::Delegate { | 41 public views::TrayBubbleView::Delegate { |
42 public: | 42 public: |
43 explicit SystemTray(WmShelf* wm_shelf); | 43 explicit SystemTray(WmShelf* wm_shelf); |
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 const gfx::Insets& insets); |
50 | 51 |
51 // Resets internal pointers. | 52 // Resets internal pointers. |
52 void Shutdown(); | 53 void Shutdown(); |
53 | 54 |
54 // Adds a new item in the tray. | 55 // Adds a new item in the tray. |
55 void AddTrayItem(SystemTrayItem* item); | 56 void AddTrayItem(SystemTrayItem* item); |
56 | 57 |
57 // Removes an existing tray item. | 58 // Removes an existing tray item. |
58 void RemoveTrayItem(SystemTrayItem* item); | 59 void RemoveTrayItem(SystemTrayItem* item); |
59 | 60 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 // Returns view for help button if default view is shown. Returns NULL | 124 // Returns view for help button if default view is shown. Returns NULL |
124 // otherwise. | 125 // otherwise. |
125 views::View* GetHelpButtonView() const; | 126 views::View* GetHelpButtonView() const; |
126 | 127 |
127 // Accessors for testing. | 128 // Accessors for testing. |
128 | 129 |
129 // Returns true if the bubble exists. | 130 // Returns true if the bubble exists. |
130 bool CloseNotificationBubbleForTest() const; | 131 bool CloseNotificationBubbleForTest() const; |
131 | 132 |
132 // Overridden from TrayBackgroundView. | 133 // Overridden from TrayBackgroundView. |
133 void SetShelfAlignment(ShelfAlignment alignment) override; | 134 void SetShelfAlignment(ShelfAlignment alignment, |
| 135 const gfx::Insets& insets) override; |
134 void AnchorUpdated() override; | 136 void AnchorUpdated() override; |
135 base::string16 GetAccessibleNameForTray() override; | 137 base::string16 GetAccessibleNameForTray() override; |
136 void BubbleResized(const views::TrayBubbleView* bubble_view) override; | 138 void BubbleResized(const views::TrayBubbleView* bubble_view) override; |
137 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override; | 139 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override; |
138 void ClickedOutsideBubble() override; | 140 void ClickedOutsideBubble() override; |
139 | 141 |
140 // views::TrayBubbleView::Delegate: | 142 // views::TrayBubbleView::Delegate: |
141 void BubbleViewDestroyed() override; | 143 void BubbleViewDestroyed() override; |
142 void OnMouseEnteredView() override; | 144 void OnMouseEnteredView() override; |
143 void OnMouseExitedView() override; | 145 void OnMouseExitedView() override; |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 // A reference to the Screen share and capture item. | 260 // A reference to the Screen share and capture item. |
259 ScreenTrayItem* screen_capture_tray_item_; // not owned | 261 ScreenTrayItem* screen_capture_tray_item_; // not owned |
260 ScreenTrayItem* screen_share_tray_item_; // not owned | 262 ScreenTrayItem* screen_share_tray_item_; // not owned |
261 | 263 |
262 DISALLOW_COPY_AND_ASSIGN(SystemTray); | 264 DISALLOW_COPY_AND_ASSIGN(SystemTray); |
263 }; | 265 }; |
264 | 266 |
265 } // namespace ash | 267 } // namespace ash |
266 | 268 |
267 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ | 269 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ |
OLD | NEW |