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

Side by Side Diff: ui/message_center/message_popup_bubble.cc

Issue 11836003: Allow message center and related bubbles to render on Windows. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Move comment and early return instead of big blocks. Created 7 years, 11 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
« no previous file with comments | « ui/message_center/message_center_bubble.cc ('k') | ui/message_center/quiet_mode_bubble.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/message_popup_bubble.h" 5 #include "ui/message_center/message_popup_bubble.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "ui/message_center/message_view.h" 8 #include "ui/message_center/message_view.h"
9 #include "ui/message_center/message_view_factory.h" 9 #include "ui/message_center/message_view_factory.h"
10 #include "ui/notifications/notification_types.h" 10 #include "ui/notifications/notification_types.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 explicit PopupBubbleContentsView(NotificationList::Delegate* list_delegate) 44 explicit PopupBubbleContentsView(NotificationList::Delegate* list_delegate)
45 : list_delegate_(list_delegate) { 45 : list_delegate_(list_delegate) {
46 SetLayoutManager( 46 SetLayoutManager(
47 new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 1)); 47 new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 1));
48 48
49 content_ = new views::View; 49 content_ = new views::View;
50 content_->SetLayoutManager( 50 content_->SetLayoutManager(
51 new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 1)); 51 new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 1));
52 AddChildView(content_); 52 AddChildView(content_);
53 53
54 content_->SetPaintToLayer(true); 54 if (get_use_acceleration_when_possible()) {
55 content_->SetFillsBoundsOpaquely(false); 55 content_->SetPaintToLayer(true);
56 content_->layer()->SetMasksToBounds(true); 56 content_->SetFillsBoundsOpaquely(false);
57 content_->layer()->SetMasksToBounds(true);
58 }
57 } 59 }
58 60
59 void Update(const NotificationList::Notifications& popup_notifications) { 61 void Update(const NotificationList::Notifications& popup_notifications) {
60 content_->RemoveAllChildViews(true); 62 content_->RemoveAllChildViews(true);
61 for (NotificationList::Notifications::const_iterator iter = 63 for (NotificationList::Notifications::const_iterator iter =
62 popup_notifications.begin(); 64 popup_notifications.begin();
63 iter != popup_notifications.end(); ++iter) { 65 iter != popup_notifications.end(); ++iter) {
64 MessageView* view = 66 MessageView* view =
65 MessageViewFactory::ViewForNotification(*iter, list_delegate_); 67 MessageViewFactory::ViewForNotification(*iter, list_delegate_);
66 view->SetUpView(); 68 view->SetUpView();
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 else 196 else
195 should_run_default_timer_ = false; 197 should_run_default_timer_ = false;
196 UpdateBubbleView(); 198 UpdateBubbleView();
197 } 199 }
198 200
199 size_t MessagePopupBubble::NumMessageViewsForTest() const { 201 size_t MessagePopupBubble::NumMessageViewsForTest() const {
200 return contents_view_->NumMessageViews(); 202 return contents_view_->NumMessageViews();
201 } 203 }
202 204
203 } // namespace message_center 205 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/message_center/message_center_bubble.cc ('k') | ui/message_center/quiet_mode_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698