| 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 "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/system/tray/system_tray_bubble.h" | 9 #include "ash/system/tray/system_tray_bubble.h" |
| 10 #include "ash/system/tray/tray_background_view.h" | 10 #include "ash/system/tray/tray_background_view.h" |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 // Returns view for help button if default view is shown. Returns NULL | 116 // Returns view for help button if default view is shown. Returns NULL |
| 117 // otherwise. | 117 // otherwise. |
| 118 views::View* GetHelpButtonView() const; | 118 views::View* GetHelpButtonView() const; |
| 119 | 119 |
| 120 // Accessors for testing. | 120 // Accessors for testing. |
| 121 | 121 |
| 122 // Returns true if the bubble exists. | 122 // Returns true if the bubble exists. |
| 123 bool CloseNotificationBubbleForTest() const; | 123 bool CloseNotificationBubbleForTest() const; |
| 124 | 124 |
| 125 // Overridden from TrayBackgroundView. | 125 // Overridden from TrayBackgroundView. |
| 126 virtual void SetShelfAlignment(ShelfAlignment alignment) OVERRIDE; | 126 virtual void SetShelfAlignment(ShelfAlignment alignment) override; |
| 127 virtual void AnchorUpdated() OVERRIDE; | 127 virtual void AnchorUpdated() override; |
| 128 virtual base::string16 GetAccessibleNameForTray() OVERRIDE; | 128 virtual base::string16 GetAccessibleNameForTray() override; |
| 129 virtual void BubbleResized(const views::TrayBubbleView* bubble_view) OVERRIDE; | 129 virtual void BubbleResized(const views::TrayBubbleView* bubble_view) override; |
| 130 virtual void HideBubbleWithView( | 130 virtual void HideBubbleWithView( |
| 131 const views::TrayBubbleView* bubble_view) OVERRIDE; | 131 const views::TrayBubbleView* bubble_view) override; |
| 132 virtual bool ClickedOutsideBubble() OVERRIDE; | 132 virtual bool ClickedOutsideBubble() override; |
| 133 | 133 |
| 134 // Overridden from message_center::TrayBubbleView::Delegate. | 134 // Overridden from message_center::TrayBubbleView::Delegate. |
| 135 virtual void BubbleViewDestroyed() OVERRIDE; | 135 virtual void BubbleViewDestroyed() override; |
| 136 virtual void OnMouseEnteredView() OVERRIDE; | 136 virtual void OnMouseEnteredView() override; |
| 137 virtual void OnMouseExitedView() OVERRIDE; | 137 virtual void OnMouseExitedView() override; |
| 138 virtual base::string16 GetAccessibleNameForBubble() OVERRIDE; | 138 virtual base::string16 GetAccessibleNameForBubble() override; |
| 139 virtual gfx::Rect GetAnchorRect( | 139 virtual gfx::Rect GetAnchorRect( |
| 140 views::Widget* anchor_widget, | 140 views::Widget* anchor_widget, |
| 141 AnchorType anchor_type, | 141 AnchorType anchor_type, |
| 142 AnchorAlignment anchor_alignment) const OVERRIDE; | 142 AnchorAlignment anchor_alignment) const override; |
| 143 virtual void HideBubble(const views::TrayBubbleView* bubble_view) OVERRIDE; | 143 virtual void HideBubble(const views::TrayBubbleView* bubble_view) override; |
| 144 | 144 |
| 145 ScreenTrayItem* GetScreenShareItem() { return screen_share_tray_item_; } | 145 ScreenTrayItem* GetScreenShareItem() { return screen_share_tray_item_; } |
| 146 ScreenTrayItem* GetScreenCaptureItem() { return screen_capture_tray_item_; } | 146 ScreenTrayItem* GetScreenCaptureItem() { return screen_capture_tray_item_; } |
| 147 | 147 |
| 148 TrayAccessibility* GetTrayAccessibilityForTest() { | 148 TrayAccessibility* GetTrayAccessibilityForTest() { |
| 149 return tray_accessibility_; | 149 return tray_accessibility_; |
| 150 } | 150 } |
| 151 | 151 |
| 152 // Get the tray item view (or NULL) for a given |tray_item| in a unit test. | 152 // Get the tray item view (or NULL) for a given |tray_item| in a unit test. |
| 153 views::View* GetTrayItemViewForTest(SystemTrayItem* tray_item); | 153 views::View* GetTrayItemViewForTest(SystemTrayItem* tray_item); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 // Checks the current status of the system tray and updates the web | 195 // Checks the current status of the system tray and updates the web |
| 196 // notification tray according to the current status. | 196 // notification tray according to the current status. |
| 197 void UpdateWebNotifications(); | 197 void UpdateWebNotifications(); |
| 198 | 198 |
| 199 // Deactivate the system tray in the shelf if it was active before. | 199 // Deactivate the system tray in the shelf if it was active before. |
| 200 void CloseSystemBubbleAndDeactivateSystemTray(); | 200 void CloseSystemBubbleAndDeactivateSystemTray(); |
| 201 | 201 |
| 202 const ScopedVector<SystemTrayItem>& items() const { return items_; } | 202 const ScopedVector<SystemTrayItem>& items() const { return items_; } |
| 203 | 203 |
| 204 // Overridden from ActionableView. | 204 // Overridden from ActionableView. |
| 205 virtual bool PerformAction(const ui::Event& event) OVERRIDE; | 205 virtual bool PerformAction(const ui::Event& event) override; |
| 206 | 206 |
| 207 // Owned items. | 207 // Owned items. |
| 208 ScopedVector<SystemTrayItem> items_; | 208 ScopedVector<SystemTrayItem> items_; |
| 209 | 209 |
| 210 // Pointers to members of |items_|. | 210 // Pointers to members of |items_|. |
| 211 SystemTrayItem* detailed_item_; | 211 SystemTrayItem* detailed_item_; |
| 212 std::vector<SystemTrayItem*> notification_items_; | 212 std::vector<SystemTrayItem*> notification_items_; |
| 213 | 213 |
| 214 // Mappings of system tray item and it's view in the tray. | 214 // Mappings of system tray item and it's view in the tray. |
| 215 std::map<SystemTrayItem*, views::View*> tray_item_map_; | 215 std::map<SystemTrayItem*, views::View*> tray_item_map_; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 239 // A reference to the Screen share and capture item. | 239 // A reference to the Screen share and capture item. |
| 240 ScreenTrayItem* screen_capture_tray_item_; // not owned | 240 ScreenTrayItem* screen_capture_tray_item_; // not owned |
| 241 ScreenTrayItem* screen_share_tray_item_; // not owned | 241 ScreenTrayItem* screen_share_tray_item_; // not owned |
| 242 | 242 |
| 243 DISALLOW_COPY_AND_ASSIGN(SystemTray); | 243 DISALLOW_COPY_AND_ASSIGN(SystemTray); |
| 244 }; | 244 }; |
| 245 | 245 |
| 246 } // namespace ash | 246 } // namespace ash |
| 247 | 247 |
| 248 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ | 248 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ |
| OLD | NEW |