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_NOTIFICATION_POPUP_BUBBLE_H_ | 5 #ifndef ASH_SYSTEM_NOTIFICATION_POPUP_BUBBLE_H_ |
6 #define ASH_SYSTEM_NOTIFICATION_POPUP_BUBBLE_H_ | 6 #define ASH_SYSTEM_NOTIFICATION_POPUP_BUBBLE_H_ |
7 | 7 |
8 #include "ash/system/web_notification/web_notification_bubble.h" | 8 #include "ash/system/web_notification/web_notification_bubble.h" |
9 #include "base/timer.h" | 9 #include "base/timer.h" |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 public: | 21 public: |
22 explicit PopupBubble(WebNotificationTray* tray); | 22 explicit PopupBubble(WebNotificationTray* tray); |
23 | 23 |
24 virtual ~PopupBubble(); | 24 virtual ~PopupBubble(); |
25 | 25 |
26 size_t NumMessageViewsForTest() const; | 26 size_t NumMessageViewsForTest() const; |
27 | 27 |
28 bool dirty() const { return dirty_; } | 28 bool dirty() const { return dirty_; } |
29 void set_dirty(bool dirty) { dirty_ = dirty; } | 29 void set_dirty(bool dirty) { dirty_ = dirty; } |
30 | 30 |
31 // Overridden from TrayBubbleView::Host. | 31 // Overridden from TrayBubbleView::Delegate. |
32 virtual void BubbleViewDestroyed() OVERRIDE; | 32 virtual void BubbleViewDestroyed() OVERRIDE; |
33 | |
34 virtual void OnMouseEnteredView() OVERRIDE; | 33 virtual void OnMouseEnteredView() OVERRIDE; |
35 | |
36 virtual void OnMouseExitedView() OVERRIDE; | 34 virtual void OnMouseExitedView() OVERRIDE; |
37 | 35 |
38 private: | 36 private: |
39 // Overridden from WebNotificationBubble. | 37 // Overridden from WebNotificationBubble. |
40 virtual void UpdateBubbleView() OVERRIDE; | 38 virtual void UpdateBubbleView() OVERRIDE; |
41 | 39 |
42 void StartAutoCloseTimer(); | 40 void StartAutoCloseTimer(); |
43 | 41 |
44 void StopAutoCloseTimer(); | 42 void StopAutoCloseTimer(); |
45 | 43 |
46 void OnAutoClose(); | 44 void OnAutoClose(); |
47 | 45 |
48 base::OneShotTimer<PopupBubble> autoclose_; | 46 base::OneShotTimer<PopupBubble> autoclose_; |
49 PopupBubbleContentsView* contents_view_; | 47 PopupBubbleContentsView* contents_view_; |
50 size_t num_popups_; | 48 size_t num_popups_; |
51 bool dirty_; | 49 bool dirty_; |
52 | 50 |
53 DISALLOW_COPY_AND_ASSIGN(PopupBubble); | 51 DISALLOW_COPY_AND_ASSIGN(PopupBubble); |
54 }; | 52 }; |
55 | 53 |
56 } // namespace message_center | 54 } // namespace message_center |
57 | 55 |
58 } // namespace ash | 56 } // namespace ash |
59 | 57 |
60 #endif // ASH_SYSTEM_NOTIFICATION_POPUP_BUBBLE_H_ | 58 #endif // ASH_SYSTEM_NOTIFICATION_POPUP_BUBBLE_H_ |
OLD | NEW |