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

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

Issue 2835233005: Revert of Introduce a type of View background that stays in sync with its host (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « chrome/browser/ui/views/sad_tab_view.cc ('k') | ui/message_center/views/message_bubble_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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
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
60 protected: 62 protected:
61 views::TrayBubbleView::InitParams GetDefaultInitParams( 63 views::TrayBubbleView::InitParams GetDefaultInitParams(
62 views::TrayBubbleView::AnchorAlignment anchor_alignment); 64 views::TrayBubbleView::AnchorAlignment anchor_alignment);
63 MessageCenter* message_center() { return message_center_; } 65 MessageCenter* message_center() { return message_center_; }
64 MessageCenterTray* tray() { return tray_; } 66 MessageCenterTray* tray() { return tray_; }
65 void set_bubble_view(views::TrayBubbleView* bubble_view) { 67 void set_bubble_view(views::TrayBubbleView* bubble_view) {
66 bubble_view_ = bubble_view; 68 bubble_view_ = bubble_view;
67 } 69 }
68 70
69 private: 71 private:
70 MessageCenter* message_center_; 72 MessageCenter* message_center_;
71 MessageCenterTray* tray_; 73 MessageCenterTray* tray_;
72 views::TrayBubbleView* bubble_view_; 74 views::TrayBubbleView* bubble_view_;
73 int max_height_; 75 int max_height_;
74 base::WeakPtrFactory<MessageBubbleBase> weak_ptr_factory_; 76 base::WeakPtrFactory<MessageBubbleBase> weak_ptr_factory_;
75 77
76 DISALLOW_COPY_AND_ASSIGN(MessageBubbleBase); 78 DISALLOW_COPY_AND_ASSIGN(MessageBubbleBase);
77 }; 79 };
78 80
79 } // namespace message_center 81 } // namespace message_center
80 82
81 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_BUBBLE_BASE_H_ 83 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_BUBBLE_BASE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/sad_tab_view.cc ('k') | ui/message_center/views/message_bubble_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698