Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(311)

Side by Side Diff: ui/message_center/views/message_popup_bubble.h

Issue 12326091: Made notification center notifications collapsed and expandable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, rebase, and rebase again! Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 UI_MESSAGE_CENTER_VIEWS_MESSAGE_POPUP_BUBBLE_H_ 5 #ifndef UI_MESSAGE_CENTER_VIEWS_MESSAGE_POPUP_BUBBLE_H_
6 #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_POPUP_BUBBLE_H_ 6 #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_POPUP_BUBBLE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
11 11
12 #include "base/timer.h" 12 #include "base/timer.h"
13 #include "ui/message_center/message_center_export.h" 13 #include "ui/message_center/message_center_export.h"
14 #include "ui/message_center/notification_list.h"
15 #include "ui/message_center/views/message_bubble_base.h" 14 #include "ui/message_center/views/message_bubble_base.h"
16 15
17 namespace message_center { 16 namespace message_center {
18 17
19 class PopupBubbleContentsView; 18 class PopupBubbleContentsView;
20 19
21 // Bubble for popup notifications. 20 // Bubble for popup notifications.
22 class MESSAGE_CENTER_EXPORT MessagePopupBubble : public MessageBubbleBase { 21 class MESSAGE_CENTER_EXPORT MessagePopupBubble : public MessageBubbleBase {
23 public: 22 public:
24 explicit MessagePopupBubble(NotificationList::Delegate* delegate); 23 explicit MessagePopupBubble(MessageCenter* message_center);
25 24
26 virtual ~MessagePopupBubble(); 25 virtual ~MessagePopupBubble();
27 26
28 // Overridden from MessageBubbleBase. 27 // Overridden from MessageBubbleBase:
29 virtual views::TrayBubbleView::InitParams GetInitParams( 28 virtual views::TrayBubbleView::InitParams GetInitParams(
30 views::TrayBubbleView::AnchorAlignment anchor_alignment) OVERRIDE; 29 views::TrayBubbleView::AnchorAlignment anchor_alignment) OVERRIDE;
31 virtual void InitializeContents(views::TrayBubbleView* bubble_view) OVERRIDE; 30 virtual void InitializeContents(views::TrayBubbleView* bubble_view) OVERRIDE;
32 virtual void OnBubbleViewDestroyed() OVERRIDE; 31 virtual void OnBubbleViewDestroyed() OVERRIDE;
33 virtual void UpdateBubbleView() OVERRIDE; 32 virtual void UpdateBubbleView() OVERRIDE;
34 virtual void OnMouseEnteredView() OVERRIDE; 33 virtual void OnMouseEnteredView() OVERRIDE;
35 virtual void OnMouseExitedView() OVERRIDE; 34 virtual void OnMouseExitedView() OVERRIDE;
36 35
37 size_t NumMessageViewsForTest() const; 36 size_t NumMessageViewsForTest() const;
38 37
39 private: 38 private:
40 class AutocloseTimer; 39 class AutocloseTimer;
41 40
42 void OnAutoClose(const std::string& id); 41 void OnAutoClose(const std::string& id);
43 42
44 void DeleteTimer(const std::string& id); 43 void DeleteTimer(const std::string& id);
45 44
46 std::map<std::string, AutocloseTimer*> autoclose_timers_; 45 std::map<std::string, AutocloseTimer*> autoclose_timers_;
47 PopupBubbleContentsView* contents_view_; 46 PopupBubbleContentsView* contents_view_;
48 std::set<std::string> popup_ids_; 47 std::set<std::string> popup_ids_;
49 48
50 DISALLOW_COPY_AND_ASSIGN(MessagePopupBubble); 49 DISALLOW_COPY_AND_ASSIGN(MessagePopupBubble);
51 }; 50 };
52 51
53 } // namespace message_center 52 } // namespace message_center
54 53
55 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_POPUP_BUBBLE_H_ 54 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_POPUP_BUBBLE_H_
OLDNEW
« no previous file with comments | « ui/message_center/views/message_center_bubble.cc ('k') | ui/message_center/views/message_popup_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698