| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |