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

Side by Side Diff: ui/views/bubble/tray_bubble_view.cc

Issue 145033006: views: Make View::set_border() take a scoped_ptr<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 6 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 | Annotate | Revision Log
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/views/bubble/tray_bubble_view.h" 5 #include "ui/views/bubble/tray_bubble_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "third_party/skia/include/core/SkCanvas.h" 9 #include "third_party/skia/include/core/SkCanvas.h"
10 #include "third_party/skia/include/core/SkColor.h" 10 #include "third_party/skia/include/core/SkColor.h"
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 params_.anchor_type, 405 params_.anchor_type,
406 params_.anchor_alignment); 406 params_.anchor_alignment);
407 } 407 }
408 408
409 bool TrayBubbleView::CanActivate() const { 409 bool TrayBubbleView::CanActivate() const {
410 return params_.can_activate; 410 return params_.can_activate;
411 } 411 }
412 412
413 NonClientFrameView* TrayBubbleView::CreateNonClientFrameView(Widget* widget) { 413 NonClientFrameView* TrayBubbleView::CreateNonClientFrameView(Widget* widget) {
414 BubbleFrameView* frame = new BubbleFrameView(margins()); 414 BubbleFrameView* frame = new BubbleFrameView(margins());
415 frame->SetBubbleBorder(bubble_border_); 415 frame->SetBubbleBorder(scoped_ptr<views::BubbleBorder>(bubble_border_));
416 return frame; 416 return frame;
417 } 417 }
418 418
419 bool TrayBubbleView::WidgetHasHitTestMask() const { 419 bool TrayBubbleView::WidgetHasHitTestMask() const {
420 return true; 420 return true;
421 } 421 }
422 422
423 void TrayBubbleView::GetWidgetHitTestMask(gfx::Path* mask) const { 423 void TrayBubbleView::GetWidgetHitTestMask(gfx::Path* mask) const {
424 DCHECK(mask); 424 DCHECK(mask);
425 mask->addRect(gfx::RectToSkRect(GetBubbleFrameView()->GetContentsBounds())); 425 mask->addRect(gfx::RectToSkRect(GetBubbleFrameView()->GetContentsBounds()));
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 const ViewHierarchyChangedDetails& details) { 506 const ViewHierarchyChangedDetails& details) {
507 if (get_use_acceleration_when_possible() && details.is_add && 507 if (get_use_acceleration_when_possible() && details.is_add &&
508 details.child == this) { 508 details.child == this) {
509 details.parent->SetPaintToLayer(true); 509 details.parent->SetPaintToLayer(true);
510 details.parent->SetFillsBoundsOpaquely(true); 510 details.parent->SetFillsBoundsOpaquely(true);
511 details.parent->layer()->SetMasksToBounds(true); 511 details.parent->layer()->SetMasksToBounds(true);
512 } 512 }
513 } 513 }
514 514
515 } // namespace views 515 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/bubble/bubble_frame_view_unittest.cc ('k') | ui/views/color_chooser/color_chooser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698