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

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

Issue 2555373004: Apply new MD shadows to CrOS tray bubbles. (Closed)
Patch Set: . Created 4 years 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 initially_settings_visible_ = true; 79 initially_settings_visible_ = true;
80 } 80 }
81 81
82 views::TrayBubbleView::InitParams MessageCenterBubble::GetInitParams( 82 views::TrayBubbleView::InitParams MessageCenterBubble::GetInitParams(
83 views::TrayBubbleView::AnchorAlignment anchor_alignment) { 83 views::TrayBubbleView::AnchorAlignment anchor_alignment) {
84 views::TrayBubbleView::InitParams init_params = 84 views::TrayBubbleView::InitParams init_params =
85 GetDefaultInitParams(anchor_alignment); 85 GetDefaultInitParams(anchor_alignment);
86 init_params.min_width += kMarginBetweenItems * 2; 86 init_params.min_width += kMarginBetweenItems * 2;
87 init_params.max_width += kMarginBetweenItems * 2; 87 init_params.max_width += kMarginBetweenItems * 2;
88 init_params.max_height = max_height(); 88 init_params.max_height = max_height();
89 init_params.can_activate = true;
90 return init_params; 89 return init_params;
91 } 90 }
92 91
93 void MessageCenterBubble::InitializeContents( 92 void MessageCenterBubble::InitializeContents(
94 views::TrayBubbleView* new_bubble_view) { 93 views::TrayBubbleView* new_bubble_view) {
95 set_bubble_view(new_bubble_view); 94 set_bubble_view(new_bubble_view);
96 bubble_view()->GetWidget()->AddObserver(this); 95 bubble_view()->GetWidget()->AddObserver(this);
97 message_center_view_ = new MessageCenterView( 96 message_center_view_ = new MessageCenterView(
98 message_center(), tray(), max_height(), initially_settings_visible_, 97 message_center(), tray(), max_height(), initially_settings_visible_,
99 false); /* MessageCenterBubble should be used only on ChromeOS. 98 false); /* MessageCenterBubble should be used only on ChromeOS.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 } 130 }
132 131
133 void MessageCenterBubble::OnMouseExitedView() { 132 void MessageCenterBubble::OnMouseExitedView() {
134 } 133 }
135 134
136 size_t MessageCenterBubble::NumMessageViewsForTest() const { 135 size_t MessageCenterBubble::NumMessageViewsForTest() const {
137 return message_center_view_->NumMessageViewsForTest(); 136 return message_center_view_->NumMessageViewsForTest();
138 } 137 }
139 138
140 } // namespace message_center 139 } // namespace message_center
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698