| 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_COMMON_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_ | 5 #ifndef ASH_COMMON_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_ |
| 6 #define ASH_COMMON_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_ | 6 #define ASH_COMMON_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 class MessageCenterBubble; | 38 class MessageCenterBubble; |
| 39 class MessagePopupCollection; | 39 class MessagePopupCollection; |
| 40 } | 40 } |
| 41 | 41 |
| 42 namespace ash { | 42 namespace ash { |
| 43 class AshPopupAlignmentDelegate; | 43 class AshPopupAlignmentDelegate; |
| 44 class SystemTray; | 44 class SystemTray; |
| 45 class WebNotificationBubbleWrapper; | 45 class WebNotificationBubbleWrapper; |
| 46 class WebNotificationButton; | 46 class WebNotificationButton; |
| 47 class WmWindow; | 47 class WmWindow; |
| 48 class WmShelfObserver; |
| 48 | 49 |
| 49 class ASH_EXPORT WebNotificationTray | 50 class ASH_EXPORT WebNotificationTray |
| 50 : public TrayBackgroundView, | 51 : public TrayBackgroundView, |
| 51 public views::TrayBubbleView::Delegate, | 52 public views::TrayBubbleView::Delegate, |
| 52 public message_center::MessageCenterTrayDelegate, | 53 public message_center::MessageCenterTrayDelegate, |
| 53 public views::ButtonListener, | 54 public views::ButtonListener, |
| 54 public base::SupportsWeakPtr<WebNotificationTray>, | 55 public base::SupportsWeakPtr<WebNotificationTray>, |
| 55 public ui::SimpleMenuModel::Delegate { | 56 public ui::SimpleMenuModel::Delegate { |
| 56 public: | 57 public: |
| 57 WebNotificationTray(WmShelf* shelf, | 58 WebNotificationTray(WmShelf* shelf, |
| 58 WmWindow* status_area_window, | 59 WmWindow* status_area_window, |
| 59 SystemTray* system_tray); | 60 SystemTray* system_tray, |
| 61 WmShelfObserver* wm_shelf_observer); |
| 60 ~WebNotificationTray() override; | 62 ~WebNotificationTray() override; |
| 61 | 63 |
| 62 // Sets the height of the system tray bubble (or legacy notification bubble) | 64 // Sets the height of the system tray bubble (or legacy notification bubble) |
| 63 // from the edge of the work area so that the web notification popups don't | 65 // from the edge of the work area so that the web notification popups don't |
| 64 // overlap with the tray. Pass 0 if no bubble is shown. | 66 // overlap with the tray. Pass 0 if no bubble is shown. |
| 65 void SetTrayBubbleHeight(int height); | 67 void SetTrayBubbleHeight(int height); |
| 66 | 68 |
| 67 // Returns the current tray bubble height or 0 if there is no bubble. | 69 // Returns the current tray bubble height or 0 if there is no bubble. |
| 68 int tray_bubble_height_for_test() const; | 70 int tray_bubble_height_for_test() const; |
| 69 | 71 |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 bool should_block_shelf_auto_hide_; | 190 bool should_block_shelf_auto_hide_; |
| 189 | 191 |
| 190 std::unique_ptr<AshPopupAlignmentDelegate> popup_alignment_delegate_; | 192 std::unique_ptr<AshPopupAlignmentDelegate> popup_alignment_delegate_; |
| 191 | 193 |
| 192 DISALLOW_COPY_AND_ASSIGN(WebNotificationTray); | 194 DISALLOW_COPY_AND_ASSIGN(WebNotificationTray); |
| 193 }; | 195 }; |
| 194 | 196 |
| 195 } // namespace ash | 197 } // namespace ash |
| 196 | 198 |
| 197 #endif // ASH_COMMON_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_ | 199 #endif // ASH_COMMON_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_ |
| OLD | NEW |