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

Side by Side Diff: ui/message_center/message_center_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: Remove ifdefs. 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
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_center_bubble.h" 5 #include "ui/message_center/message_center_bubble.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "grit/ui_strings.h" 8 #include "grit/ui_strings.h"
9 #include "ui/base/l10n/l10n_util.h" 9 #include "ui/base/l10n/l10n_util.h"
10 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 bubble_(bubble) { 231 bubble_(bubble) {
232 int between_child = UseNewDesign() ? 0 : 1; 232 int between_child = UseNewDesign() ? 0 : 1;
233 SetLayoutManager( 233 SetLayoutManager(
234 new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, between_child)); 234 new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, between_child));
235 235
236 scroll_content_ = new ScrollContentView; 236 scroll_content_ = new ScrollContentView;
237 scroller_ = new FixedSizedScrollView; 237 scroller_ = new FixedSizedScrollView;
238 scroller_->SetContents(scroll_content_); 238 scroller_->SetContents(scroll_content_);
239 AddChildView(scroller_); 239 AddChildView(scroller_);
240 240
241 scroller_->SetPaintToLayer(true); 241 if (get_use_acceleration_when_possible()) {
242 scroller_->SetFillsBoundsOpaquely(false); 242 scroller_->SetPaintToLayer(true);
243 scroller_->layer()->SetMasksToBounds(true); 243 scroller_->SetFillsBoundsOpaquely(false);
244 scroller_->layer()->SetMasksToBounds(true);
245 }
244 246
245 button_view_ = new WebNotificationButtonView(list_delegate); 247 button_view_ = new WebNotificationButtonView(list_delegate);
246 AddChildView(button_view_); 248 AddChildView(button_view_);
247 } 249 }
248 250
249 void FocusContents() { 251 void FocusContents() {
250 scroller_->RequestFocus(); 252 scroller_->RequestFocus();
251 } 253 }
252 254
253 void Update(const NotificationList::Notifications& notifications) { 255 void Update(const NotificationList::Notifications& notifications) {
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 } 377 }
376 378
377 void MessageCenterBubble::OnMouseExitedView() { 379 void MessageCenterBubble::OnMouseExitedView() {
378 } 380 }
379 381
380 size_t MessageCenterBubble::NumMessageViewsForTest() const { 382 size_t MessageCenterBubble::NumMessageViewsForTest() const {
381 return contents_view_->NumMessageViews(); 383 return contents_view_->NumMessageViews();
382 } 384 }
383 385
384 } // namespace message_center 386 } // namespace message_center
OLDNEW
« no previous file with comments | « no previous file | ui/message_center/message_popup_bubble.cc » ('j') | ui/views/controls/slide_out_view.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698