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 #include "ui/message_center/views/message_center_bubble.h" | 5 #include "ui/message_center/views/message_center_bubble.h" |
6 | 6 |
7 #include "ui/message_center/message_center_style.h" | 7 #include "ui/message_center/message_center_style.h" |
8 #include "ui/message_center/message_center_util.h" | 8 #include "ui/message_center/message_center_util.h" |
9 #include "ui/message_center/views/message_center_view.h" | 9 #include "ui/message_center/views/message_center_view.h" |
10 #include "ui/views/layout/fill_layout.h" | 10 #include "ui/views/layout/fill_layout.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 if (message_center_view_) | 71 if (message_center_view_) |
72 message_center_view_->SetSettingsVisible(true); | 72 message_center_view_->SetSettingsVisible(true); |
73 else | 73 else |
74 initially_settings_visible_ = true; | 74 initially_settings_visible_ = true; |
75 } | 75 } |
76 | 76 |
77 views::TrayBubbleView::InitParams MessageCenterBubble::GetInitParams( | 77 views::TrayBubbleView::InitParams MessageCenterBubble::GetInitParams( |
78 views::TrayBubbleView::AnchorAlignment anchor_alignment) { | 78 views::TrayBubbleView::AnchorAlignment anchor_alignment) { |
79 views::TrayBubbleView::InitParams init_params = | 79 views::TrayBubbleView::InitParams init_params = |
80 GetDefaultInitParams(anchor_alignment); | 80 GetDefaultInitParams(anchor_alignment); |
81 if (IsRichNotificationEnabled()) { | 81 init_params.min_width += kMarginBetweenItems * 2; |
82 init_params.min_width += kMarginBetweenItems * 2; | 82 init_params.max_width += kMarginBetweenItems * 2; |
83 init_params.max_width += kMarginBetweenItems * 2; | |
84 } | |
85 init_params.max_height = max_height(); | 83 init_params.max_height = max_height(); |
86 init_params.can_activate = true; | 84 init_params.can_activate = true; |
87 return init_params; | 85 return init_params; |
88 } | 86 } |
89 | 87 |
90 void MessageCenterBubble::InitializeContents( | 88 void MessageCenterBubble::InitializeContents( |
91 views::TrayBubbleView* new_bubble_view) { | 89 views::TrayBubbleView* new_bubble_view) { |
92 set_bubble_view(new_bubble_view); | 90 set_bubble_view(new_bubble_view); |
93 message_center_view_ = new MessageCenterView( | 91 message_center_view_ = new MessageCenterView( |
94 message_center(), tray(), max_height(), initially_settings_visible_); | 92 message_center(), tray(), max_height(), initially_settings_visible_); |
(...skipping 23 matching lines...) Expand all Loading... |
118 } | 116 } |
119 | 117 |
120 void MessageCenterBubble::OnMouseExitedView() { | 118 void MessageCenterBubble::OnMouseExitedView() { |
121 } | 119 } |
122 | 120 |
123 size_t MessageCenterBubble::NumMessageViewsForTest() const { | 121 size_t MessageCenterBubble::NumMessageViewsForTest() const { |
124 return message_center_view_->NumMessageViewsForTest(); | 122 return message_center_view_->NumMessageViewsForTest(); |
125 } | 123 } |
126 | 124 |
127 } // namespace message_center | 125 } // namespace message_center |
OLD | NEW |