| 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 UI_MESSAGE_CENTER_VIEWS_MESSAGE_POPUP_BUBBLE_H_ | |
| 6 #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_POPUP_BUBBLE_H_ | |
| 7 | |
| 8 #include <map> | |
| 9 #include <set> | |
| 10 #include <string> | |
| 11 | |
| 12 #include "base/timer/timer.h" | |
| 13 #include "ui/message_center/message_center_export.h" | |
| 14 #include "ui/message_center/views/message_bubble_base.h" | |
| 15 | |
| 16 namespace message_center { | |
| 17 | |
| 18 class PopupBubbleContentsView; | |
| 19 | |
| 20 // Bubble for popup notifications. | |
| 21 class MESSAGE_CENTER_EXPORT MessagePopupBubble : public MessageBubbleBase { | |
| 22 public: | |
| 23 explicit MessagePopupBubble(MessageCenter* message_center); | |
| 24 | |
| 25 virtual ~MessagePopupBubble(); | |
| 26 | |
| 27 // Overridden from MessageBubbleBase: | |
| 28 virtual views::TrayBubbleView::InitParams GetInitParams( | |
| 29 views::TrayBubbleView::AnchorAlignment anchor_alignment) OVERRIDE; | |
| 30 virtual void InitializeContents(views::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 class AutocloseTimer; | |
| 40 | |
| 41 void OnAutoClose(const std::string& id); | |
| 42 | |
| 43 void DeleteTimer(const std::string& id); | |
| 44 | |
| 45 std::map<std::string, AutocloseTimer*> autoclose_timers_; | |
| 46 PopupBubbleContentsView* contents_view_; | |
| 47 std::set<std::string> popup_ids_; | |
| 48 | |
| 49 DISALLOW_COPY_AND_ASSIGN(MessagePopupBubble); | |
| 50 }; | |
| 51 | |
| 52 } // namespace message_center | |
| 53 | |
| 54 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_POPUP_BUBBLE_H_ | |
| OLD | NEW |