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

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: 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 | « no previous file | ui/message_center/message_popup_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_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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 bubble_(bubble) { 358 bubble_(bubble) {
359 int between_child = UseNewDesign() ? 0 : 1; 359 int between_child = UseNewDesign() ? 0 : 1;
360 SetLayoutManager( 360 SetLayoutManager(
361 new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, between_child)); 361 new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, between_child));
362 362
363 scroll_content_ = new ScrollContentView; 363 scroll_content_ = new ScrollContentView;
364 scroller_ = new FixedSizedScrollView; 364 scroller_ = new FixedSizedScrollView;
365 scroller_->SetContents(scroll_content_); 365 scroller_->SetContents(scroll_content_);
366 AddChildView(scroller_); 366 AddChildView(scroller_);
367 367
368 scroller_->SetPaintToLayer(true); 368 if (get_use_acceleration_when_possible()) {
369 scroller_->SetFillsBoundsOpaquely(false); 369 scroller_->SetPaintToLayer(true);
370 scroller_->layer()->SetMasksToBounds(true); 370 scroller_->SetFillsBoundsOpaquely(false);
371 scroller_->layer()->SetMasksToBounds(true);
372 }
371 373
372 if (UseNewDesign()) 374 if (UseNewDesign())
373 button_view_ = new WebNotificationButtonView2(list_delegate); 375 button_view_ = new WebNotificationButtonView2(list_delegate);
374 else 376 else
375 button_view_ = new WebNotificationButtonView(list_delegate); 377 button_view_ = new WebNotificationButtonView(list_delegate);
376 AddChildView(button_view_); 378 AddChildView(button_view_);
377 } 379 }
378 380
379 void FocusContents() { 381 void FocusContents() {
380 scroller_->RequestFocus(); 382 scroller_->RequestFocus();
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 } 507 }
506 508
507 void MessageCenterBubble::OnMouseExitedView() { 509 void MessageCenterBubble::OnMouseExitedView() {
508 } 510 }
509 511
510 size_t MessageCenterBubble::NumMessageViewsForTest() const { 512 size_t MessageCenterBubble::NumMessageViewsForTest() const {
511 return contents_view_->NumMessageViews(); 513 return contents_view_->NumMessageViews();
512 } 514 }
513 515
514 } // namespace message_center 516 } // namespace message_center
OLDNEW
« no previous file with comments | « no previous file | ui/message_center/message_popup_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698