| 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_WEB_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_ | 5 #ifndef ASH_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_ |
| 6 #define ASH_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_ | 6 #define ASH_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 // Status area tray for showing browser and app notifications. This hosts | 39 // Status area tray for showing browser and app notifications. This hosts |
| 40 // a MessageCenter class which manages the notification list. This class | 40 // a MessageCenter class which manages the notification list. This class |
| 41 // contains the Ash specific tray implementation. | 41 // contains the Ash specific tray implementation. |
| 42 // | 42 // |
| 43 // Note: These are not related to system notifications (i.e NotificationView | 43 // Note: These are not related to system notifications (i.e NotificationView |
| 44 // generated by SystemTrayItem). Visibility of one notification type or other | 44 // generated by SystemTrayItem). Visibility of one notification type or other |
| 45 // is controlled by StatusAreaWidget. | 45 // is controlled by StatusAreaWidget. |
| 46 class ASH_EXPORT WebNotificationTray | 46 class ASH_EXPORT WebNotificationTray |
| 47 : public TrayBackgroundView, | 47 : public TrayBackgroundView, |
| 48 public views::TrayBubbleView::Delegate, | |
| 49 public message_center::MessageCenterTrayDelegate, | 48 public message_center::MessageCenterTrayDelegate, |
| 50 public base::SupportsWeakPtr<WebNotificationTray>, | 49 public base::SupportsWeakPtr<WebNotificationTray>, |
| 51 public ui::SimpleMenuModel::Delegate { | 50 public ui::SimpleMenuModel::Delegate { |
| 52 public: | 51 public: |
| 53 WebNotificationTray(Shelf* shelf, | 52 WebNotificationTray(Shelf* shelf, |
| 54 aura::Window* status_area_window, | 53 aura::Window* status_area_window, |
| 55 SystemTray* system_tray); | 54 SystemTray* system_tray); |
| 56 ~WebNotificationTray() override; | 55 ~WebNotificationTray() override; |
| 57 | 56 |
| 58 static void DisableAnimationsForTest(bool disable); | 57 static void DisableAnimationsForTest(bool disable); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 76 | 75 |
| 77 // Called when the login status is changed. | 76 // Called when the login status is changed. |
| 78 void UpdateAfterLoginStatusChange(LoginStatus login_status); | 77 void UpdateAfterLoginStatusChange(LoginStatus login_status); |
| 79 | 78 |
| 80 // Overridden from TrayBackgroundView. | 79 // Overridden from TrayBackgroundView. |
| 81 void UpdateAfterShelfAlignmentChange() override; | 80 void UpdateAfterShelfAlignmentChange() override; |
| 82 void AnchorUpdated() override; | 81 void AnchorUpdated() override; |
| 83 base::string16 GetAccessibleNameForTray() override; | 82 base::string16 GetAccessibleNameForTray() override; |
| 84 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override; | 83 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override; |
| 85 void ClickedOutsideBubble() override; | 84 void ClickedOutsideBubble() override; |
| 86 | |
| 87 // Overridden from ActionableView. | |
| 88 bool PerformAction(const ui::Event& event) override; | 85 bool PerformAction(const ui::Event& event) override; |
| 86 void CloseBubble() override; |
| 87 void ShowBubble() override; |
| 88 views::TrayBubbleView* GetBubbleView() override; |
| 89 | 89 |
| 90 // Overridden from views::TrayBubbleView::Delegate. | 90 // Overridden from views::TrayBubbleView::Delegate. |
| 91 void BubbleViewDestroyed() override; | 91 void BubbleViewDestroyed() override; |
| 92 void OnMouseEnteredView() override; | 92 void OnMouseEnteredView() override; |
| 93 void OnMouseExitedView() override; | 93 void OnMouseExitedView() override; |
| 94 void RegisterAccelerators(const std::vector<ui::Accelerator>& accelerators, | 94 void RegisterAccelerators(const std::vector<ui::Accelerator>& accelerators, |
| 95 views::TrayBubbleView* tray_bubble_view) override; | 95 views::TrayBubbleView* tray_bubble_view) override; |
| 96 void UnregisterAllAccelerators( | 96 void UnregisterAllAccelerators( |
| 97 views::TrayBubbleView* tray_bubble_view) override; | 97 views::TrayBubbleView* tray_bubble_view) override; |
| 98 base::string16 GetAccessibleNameForBubble() override; | 98 base::string16 GetAccessibleNameForBubble() override; |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 bool should_block_shelf_auto_hide_; | 180 bool should_block_shelf_auto_hide_; |
| 181 | 181 |
| 182 std::unique_ptr<AshPopupAlignmentDelegate> popup_alignment_delegate_; | 182 std::unique_ptr<AshPopupAlignmentDelegate> popup_alignment_delegate_; |
| 183 | 183 |
| 184 DISALLOW_COPY_AND_ASSIGN(WebNotificationTray); | 184 DISALLOW_COPY_AND_ASSIGN(WebNotificationTray); |
| 185 }; | 185 }; |
| 186 | 186 |
| 187 } // namespace ash | 187 } // namespace ash |
| 188 | 188 |
| 189 #endif // ASH_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_ | 189 #endif // ASH_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_ |
| OLD | NEW |