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

Side by Side Diff: ash/system/web_notification/web_notification_bubble.h

Issue 11229022: Move ash/system/web_notification message_center to ui/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase again. Created 8 years, 1 month 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
(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_WEB_NOTIFICATION_BUBBLE_H_
6 #define ASH_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_BUBBLE_H_
7
8 #include "ash/ash_export.h"
9 #include "ash/system/tray/tray_bubble_view.h"
10 #include "ash/system/web_notification/web_notification_list.h"
11 #include "base/memory/scoped_ptr.h"
12
13 namespace message_center {
14
15 class WebNotificationContentsView;
16 class WebNotificationView;
17
18 class ASH_EXPORT WebNotificationBubble {
19 public:
20 explicit WebNotificationBubble(WebNotificationList::Delegate* list_delegate);
21
22 virtual ~WebNotificationBubble();
23
24 // Gets called when when the bubble view associated with this bubble is
25 // destroyed. Clears |bubble_view_| and calls OnBubbleViewDestroyed.
26 void BubbleViewDestroyed();
27
28 // Gets the init params for the implementation.
29 virtual TrayBubbleView::InitParams GetInitParams(
30 TrayBubbleView::AnchorAlignment anchor_alignment) = 0;
31
32 // Called after the bubble view has been constructed. Creates and initializes
33 // the bubble contents.
34 virtual void InitializeContents(TrayBubbleView* bubble_view) = 0;
35
36 // Called from BubbleViewDestroyed for implementation specific details.
37 virtual void OnBubbleViewDestroyed() = 0;
38
39 // Updates the bubble; implementation dependent.
40 virtual void UpdateBubbleView() = 0;
41
42 // Called when the mouse enters/exists the view.
43 virtual void OnMouseEnteredView() = 0;
44 virtual void OnMouseExitedView() = 0;
45
46 // Schedules bubble for layout after all notifications have been
47 // added and icons have had a chance to load.
48 void ScheduleUpdate();
49
50 bool IsVisible() const;
51
52 TrayBubbleView* bubble_view() const { return bubble_view_; }
53
54 static const SkColor kBackgroundColor;
55 static const SkColor kHeaderBackgroundColorLight;
56 static const SkColor kHeaderBackgroundColorDark;
57
58 protected:
59 TrayBubbleView::InitParams GetDefaultInitParams(
60 TrayBubbleView::AnchorAlignment anchor_alignment);
61
62 WebNotificationList::Delegate* list_delegate_;
63 TrayBubbleView* bubble_view_;
64 base::WeakPtrFactory<WebNotificationBubble> weak_ptr_factory_;
65
66 DISALLOW_COPY_AND_ASSIGN(WebNotificationBubble);
67 };
68
69 } // namespace message_center
70
71 #endif // ASH_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_BUBBLE_H_
OLDNEW
« no previous file with comments | « ash/system/web_notification/web_notification.cc ('k') | ash/system/web_notification/web_notification_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698