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

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

Issue 2901273003: chromeos: Remove TrayBubbleView::Delegate::OnBeforeBubbleWidgetInit (Closed)
Patch Set: nit Created 3 years, 6 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_bubble_base.h" 5 #include "ui/message_center/views/message_bubble_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
11 #include "ui/message_center/message_center_style.h"
12 #include "ui/views/widget/widget.h" 11 #include "ui/views/widget/widget.h"
13 #include "ui/views/widget/widget_observer.h" 12 #include "ui/views/widget/widget_observer.h"
14 13
15 namespace { 14 namespace {
16 // Delay laying out the MessageBubbleBase until all notifications have been 15 // Delay laying out the MessageBubbleBase until all notifications have been
17 // added and icons have had a chance to load. 16 // added and icons have had a chance to load.
18 const int kUpdateDelayMs = 50; 17 const int kUpdateDelayMs = 50;
19 const int kMessageBubbleBaseDefaultMaxHeight = 400; 18 const int kMessageBubbleBaseDefaultMaxHeight = 400;
20 } 19 }
21 20
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 if (height == 0) 56 if (height == 0)
58 height = kMessageBubbleBaseDefaultMaxHeight; 57 height = kMessageBubbleBaseDefaultMaxHeight;
59 if (height == max_height_) 58 if (height == max_height_)
60 return; 59 return;
61 60
62 max_height_ = height; 61 max_height_ = height;
63 if (bubble_view_) 62 if (bubble_view_)
64 bubble_view_->SetMaxHeight(max_height_); 63 bubble_view_->SetMaxHeight(max_height_);
65 } 64 }
66 65
67 views::TrayBubbleView::InitParams MessageBubbleBase::GetDefaultInitParams(
68 views::TrayBubbleView::AnchorAlignment anchor_alignment) {
69 views::TrayBubbleView::InitParams init_params(
70 anchor_alignment,
71 kNotificationWidth,
72 kNotificationWidth);
73 init_params.bg_color = kBackgroundDarkColor;
74 return init_params;
75 }
76
77 } // namespace message_center 66 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/message_center/views/message_bubble_base.h ('k') | ui/message_center/views/message_center_bubble.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698