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

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

Issue 2729533002: Adjust behavior of control buttons of notifications. (Closed)
Patch Set: Add unimplemented method to TestContentViewDelegate Created 3 years, 9 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
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 "base/macros.h" 7 #include "base/macros.h"
8 #include "ui/base/l10n/l10n_util.h" 8 #include "ui/base/l10n/l10n_util.h"
9 #include "ui/message_center/message_center_style.h" 9 #include "ui/message_center/message_center_style.h"
10 #include "ui/message_center/views/message_center_view.h" 10 #include "ui/message_center/views/message_center_view.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 return init_params; 90 return init_params;
91 } 91 }
92 92
93 void MessageCenterBubble::InitializeContents( 93 void MessageCenterBubble::InitializeContents(
94 views::TrayBubbleView* new_bubble_view) { 94 views::TrayBubbleView* new_bubble_view) {
95 set_bubble_view(new_bubble_view); 95 set_bubble_view(new_bubble_view);
96 bubble_view()->GetWidget()->AddObserver(this); 96 bubble_view()->GetWidget()->AddObserver(this);
97 message_center_view_ = new MessageCenterView( 97 message_center_view_ = new MessageCenterView(
98 message_center(), tray(), max_height(), initially_settings_visible_); 98 message_center(), tray(), max_height(), initially_settings_visible_);
99 bubble_view()->AddChildView(new ContentsView(this, message_center_view_)); 99 bubble_view()->AddChildView(new ContentsView(this, message_center_view_));
100 message_center_view_->Init();
100 // Resize the content of the bubble view to the given bubble size. This is 101 // Resize the content of the bubble view to the given bubble size. This is
101 // necessary in case of the bubble border forcing a bigger size then the 102 // necessary in case of the bubble border forcing a bigger size then the
102 // |new_bubble_view| actually wants. See crbug.com/169390. 103 // |new_bubble_view| actually wants. See crbug.com/169390.
103 bubble_view()->Layout(); 104 bubble_view()->Layout();
104 UpdateBubbleView(); 105 UpdateBubbleView();
105 } 106 }
106 107
107 void MessageCenterBubble::OnBubbleViewDestroyed() { 108 void MessageCenterBubble::OnBubbleViewDestroyed() {
108 message_center_view_ = NULL; 109 message_center_view_ = NULL;
109 } 110 }
(...skipping 19 matching lines...) Expand all
129 } 130 }
130 131
131 void MessageCenterBubble::OnMouseExitedView() { 132 void MessageCenterBubble::OnMouseExitedView() {
132 } 133 }
133 134
134 size_t MessageCenterBubble::NumMessageViewsForTest() const { 135 size_t MessageCenterBubble::NumMessageViewsForTest() const {
135 return message_center_view_->NumMessageViewsForTest(); 136 return message_center_view_->NumMessageViewsForTest();
136 } 137 }
137 138
138 } // namespace message_center 139 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/message_center/views/custom_notification_view_unittest.cc ('k') | ui/message_center/views/message_center_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698