OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef ASH_SYSTEM_WEB_NOTIFICATION_POPUP_BUBBLE_H_ | |
6 #define ASH_SYSTEM_WEB_NOTIFICATION_POPUP_BUBBLE_H_ | |
7 | |
8 #include "ash/ash_export.h" | |
9 #include "ash/system/web_notification/web_notification_bubble.h" | |
10 #include "ash/system/web_notification/web_notification_list.h" | |
11 #include "base/timer.h" | |
12 | |
13 namespace message_center { | |
14 | |
15 class PopupBubbleContentsView; | |
16 | |
17 // Bubble for popup notifications. | |
18 class ASH_EXPORT PopupBubble : public WebNotificationBubble { | |
19 public: | |
20 explicit PopupBubble(WebNotificationList::Delegate* delegate); | |
21 | |
22 virtual ~PopupBubble(); | |
23 | |
24 void StartAutoCloseTimer(); | |
25 void StopAutoCloseTimer(); | |
26 | |
27 // Overridden from WebNotificationBubble. | |
28 virtual TrayBubbleView::InitParams GetInitParams( | |
29 TrayBubbleView::AnchorAlignment anchor_alignment) OVERRIDE; | |
30 virtual void InitializeContents(TrayBubbleView* bubble_view) OVERRIDE; | |
31 virtual void OnBubbleViewDestroyed() OVERRIDE; | |
32 virtual void UpdateBubbleView() OVERRIDE; | |
33 virtual void OnMouseEnteredView() OVERRIDE; | |
34 virtual void OnMouseExitedView() OVERRIDE; | |
35 | |
36 size_t NumMessageViewsForTest() const; | |
37 | |
38 private: | |
39 void OnAutoClose(); | |
40 | |
41 base::OneShotTimer<PopupBubble> autoclose_; | |
42 PopupBubbleContentsView* contents_view_; | |
43 size_t num_popups_; | |
44 | |
45 DISALLOW_COPY_AND_ASSIGN(PopupBubble); | |
46 }; | |
47 | |
48 } // namespace message_center | |
49 | |
50 #endif // ASH_SYSTEM_WEB_NOTIFICATION_POPUP_BUBBLE_H_ | |
OLD | NEW |