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

Side by Side Diff: ui/message_center/views/message_center_bubble.cc

Issue 18003003: Message center re-organized (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
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 #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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 init_params.max_width += kMarginBetweenItems * 2; 82 init_params.max_width += kMarginBetweenItems * 2;
83 init_params.max_height = max_height(); 83 init_params.max_height = max_height();
84 init_params.can_activate = true; 84 init_params.can_activate = true;
85 return init_params; 85 return init_params;
86 } 86 }
87 87
88 void MessageCenterBubble::InitializeContents( 88 void MessageCenterBubble::InitializeContents(
89 views::TrayBubbleView* new_bubble_view) { 89 views::TrayBubbleView* new_bubble_view) {
90 set_bubble_view(new_bubble_view); 90 set_bubble_view(new_bubble_view);
91 message_center_view_ = new MessageCenterView( 91 message_center_view_ = new MessageCenterView(
92 message_center(), tray(), max_height(), initially_settings_visible_); 92 message_center(),
93 tray(),
94 max_height(),
95 initially_settings_visible_,
96 false /* This class should be used only on chrome os.
97 buttons are always on bottom for chrome os. */);
dewittj 2013/07/16 18:24:01 s/This class/MessageCenterBubble/ s/buttons/Button
sidharthms 2013/07/16 21:31:23 Done.
93 bubble_view()->AddChildView(new ContentsView(this, message_center_view_)); 98 bubble_view()->AddChildView(new ContentsView(this, message_center_view_));
94 // Resize the content of the bubble view to the given bubble size. This is 99 // Resize the content of the bubble view to the given bubble size. This is
95 // necessary in case of the bubble border forcing a bigger size then the 100 // necessary in case of the bubble border forcing a bigger size then the
96 // |new_bubble_view| actually wants. See crbug.com/169390. 101 // |new_bubble_view| actually wants. See crbug.com/169390.
97 bubble_view()->Layout(); 102 bubble_view()->Layout();
98 UpdateBubbleView(); 103 UpdateBubbleView();
99 } 104 }
100 105
101 void MessageCenterBubble::OnBubbleViewDestroyed() { 106 void MessageCenterBubble::OnBubbleViewDestroyed() {
102 message_center_view_ = NULL; 107 message_center_view_ = NULL;
(...skipping 13 matching lines...) Expand all
116 } 121 }
117 122
118 void MessageCenterBubble::OnMouseExitedView() { 123 void MessageCenterBubble::OnMouseExitedView() {
119 } 124 }
120 125
121 size_t MessageCenterBubble::NumMessageViewsForTest() const { 126 size_t MessageCenterBubble::NumMessageViewsForTest() const {
122 return message_center_view_->NumMessageViewsForTest(); 127 return message_center_view_->NumMessageViewsForTest();
123 } 128 }
124 129
125 } // namespace message_center 130 } // namespace message_center
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698