| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 } | 84 } |
| 85 init_params.max_height = max_height(); | 85 init_params.max_height = max_height(); |
| 86 init_params.can_activate = true; | 86 init_params.can_activate = true; |
| 87 return init_params; | 87 return init_params; |
| 88 } | 88 } |
| 89 | 89 |
| 90 void MessageCenterBubble::InitializeContents( | 90 void MessageCenterBubble::InitializeContents( |
| 91 views::TrayBubbleView* new_bubble_view) { | 91 views::TrayBubbleView* new_bubble_view) { |
| 92 set_bubble_view(new_bubble_view); | 92 set_bubble_view(new_bubble_view); |
| 93 message_center_view_ = new MessageCenterView( | 93 message_center_view_ = new MessageCenterView( |
| 94 message_center(), tray(), max_height(), initially_settings_visible_); | 94 message_center(), tray(), initially_settings_visible_); |
| 95 message_center_view_->Init(max_height()); |
| 95 bubble_view()->AddChildView(new ContentsView(this, message_center_view_)); | 96 bubble_view()->AddChildView(new ContentsView(this, message_center_view_)); |
| 96 // Resize the content of the bubble view to the given bubble size. This is | 97 // Resize the content of the bubble view to the given bubble size. This is |
| 97 // necessary in case of the bubble border forcing a bigger size then the | 98 // necessary in case of the bubble border forcing a bigger size then the |
| 98 // |new_bubble_view| actually wants. See crbug.com/169390. | 99 // |new_bubble_view| actually wants. See crbug.com/169390. |
| 99 bubble_view()->Layout(); | 100 bubble_view()->Layout(); |
| 100 UpdateBubbleView(); | 101 UpdateBubbleView(); |
| 101 } | 102 } |
| 102 | 103 |
| 103 void MessageCenterBubble::OnBubbleViewDestroyed() { | 104 void MessageCenterBubble::OnBubbleViewDestroyed() { |
| 104 message_center_view_ = NULL; | 105 message_center_view_ = NULL; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 118 } | 119 } |
| 119 | 120 |
| 120 void MessageCenterBubble::OnMouseExitedView() { | 121 void MessageCenterBubble::OnMouseExitedView() { |
| 121 } | 122 } |
| 122 | 123 |
| 123 size_t MessageCenterBubble::NumMessageViewsForTest() const { | 124 size_t MessageCenterBubble::NumMessageViewsForTest() const { |
| 124 return message_center_view_->NumMessageViewsForTest(); | 125 return message_center_view_->NumMessageViewsForTest(); |
| 125 } | 126 } |
| 126 | 127 |
| 127 } // namespace message_center | 128 } // namespace message_center |
| OLD | NEW |