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 UI_MESSAGE_CENTER_VIEWS_MESSAGE_BUBBLE_BASE_H_ | 5 #ifndef UI_MESSAGE_CENTER_VIEWS_MESSAGE_BUBBLE_BASE_H_ |
6 #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_BUBBLE_BASE_H_ | 6 #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_BUBBLE_BASE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 virtual void OnMouseExitedView() = 0; | 50 virtual void OnMouseExitedView() = 0; |
51 | 51 |
52 // Schedules bubble for layout after all notifications have been | 52 // Schedules bubble for layout after all notifications have been |
53 // added and icons have had a chance to load. | 53 // added and icons have had a chance to load. |
54 void ScheduleUpdate(); | 54 void ScheduleUpdate(); |
55 | 55 |
56 bool IsVisible() const; | 56 bool IsVisible() const; |
57 | 57 |
58 views::TrayBubbleView* bubble_view() const { return bubble_view_; } | 58 views::TrayBubbleView* bubble_view() const { return bubble_view_; } |
59 | 59 |
60 static const SkColor kBackgroundColor; | |
61 | |
62 protected: | 60 protected: |
63 views::TrayBubbleView::InitParams GetDefaultInitParams( | 61 views::TrayBubbleView::InitParams GetDefaultInitParams( |
64 views::TrayBubbleView::AnchorAlignment anchor_alignment); | 62 views::TrayBubbleView::AnchorAlignment anchor_alignment); |
65 MessageCenter* message_center() { return message_center_; } | 63 MessageCenter* message_center() { return message_center_; } |
66 MessageCenterTray* tray() { return tray_; } | 64 MessageCenterTray* tray() { return tray_; } |
67 void set_bubble_view(views::TrayBubbleView* bubble_view) { | 65 void set_bubble_view(views::TrayBubbleView* bubble_view) { |
68 bubble_view_ = bubble_view; | 66 bubble_view_ = bubble_view; |
69 } | 67 } |
70 | 68 |
71 private: | 69 private: |
72 MessageCenter* message_center_; | 70 MessageCenter* message_center_; |
73 MessageCenterTray* tray_; | 71 MessageCenterTray* tray_; |
74 views::TrayBubbleView* bubble_view_; | 72 views::TrayBubbleView* bubble_view_; |
75 int max_height_; | 73 int max_height_; |
76 base::WeakPtrFactory<MessageBubbleBase> weak_ptr_factory_; | 74 base::WeakPtrFactory<MessageBubbleBase> weak_ptr_factory_; |
77 | 75 |
78 DISALLOW_COPY_AND_ASSIGN(MessageBubbleBase); | 76 DISALLOW_COPY_AND_ASSIGN(MessageBubbleBase); |
79 }; | 77 }; |
80 | 78 |
81 } // namespace message_center | 79 } // namespace message_center |
82 | 80 |
83 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_BUBBLE_BASE_H_ | 81 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_BUBBLE_BASE_H_ |
OLD | NEW |