Chromium Code Reviews| Index: chrome/browser/ui/views/download/download_item_view_md.cc |
| diff --git a/chrome/browser/ui/views/download/download_item_view_md.cc b/chrome/browser/ui/views/download/download_item_view_md.cc |
| index d48f87cad5f3b6dc7e556380a6d8fec99c16b027..0f9fdc6e704509114e5e7c0b7a4efcd9ef95658e 100644 |
| --- a/chrome/browser/ui/views/download/download_item_view_md.cc |
| +++ b/chrome/browser/ui/views/download/download_item_view_md.cc |
| @@ -473,20 +473,19 @@ void DownloadItemViewMd::AddInkDropLayer(ui::Layer* ink_drop_layer) { |
| layer()->SetMasksToBounds(true); |
| } |
| -std::unique_ptr<views::InkDropAnimation> |
| -DownloadItemViewMd::CreateInkDropAnimation() const { |
| - return base::WrapUnique(new views::FloodFillInkDropAnimation( |
| - size(), ink_drop_delegate_.last_ink_drop_location(), |
| +scoped_ptr<views::InkDropAnimation> DownloadItemViewMd::CreateInkDropAnimation() |
|
jonross
2016/05/02 14:48:54
Please add: #include "base/memory/scoped_ptr.h"
I
bruthig
2016/05/02 14:59:35
Done.
|
| + const { |
| + return make_scoped_ptr(new views::FloodFillInkDropAnimation( |
| + GetLocalBounds(), ink_drop_delegate_.last_ink_drop_location(), |
| color_utils::DeriveDefaultIconColor(GetTextColor()))); |
| } |
| -std::unique_ptr<views::InkDropHover> DownloadItemViewMd::CreateInkDropHover() |
| - const { |
| +scoped_ptr<views::InkDropHover> DownloadItemViewMd::CreateInkDropHover() const { |
| if (IsShowingWarningDialog()) |
| return nullptr; |
| gfx::Size size = GetPreferredSize(); |
| - return base::WrapUnique(new views::InkDropHover( |
| + return make_scoped_ptr(new views::InkDropHover( |
| size, kInkDropSmallCornerRadius, gfx::Rect(size).CenterPoint(), |
| color_utils::DeriveDefaultIconColor(GetTextColor()))); |
| } |
| @@ -835,6 +834,10 @@ void DownloadItemViewMd::HandlePressEvent(const ui::LocatedEvent& event, |
| if (complete_animation_.get() && complete_animation_->is_animating()) |
| complete_animation_->End(); |
| + // Don't show the ripple for right clicks. |
| + if (!active_event) |
| + return; |
| + |
| ink_drop_delegate_.set_last_ink_drop_location(event.location()); |
| ink_drop_delegate_.OnAction(views::InkDropState::ACTION_PENDING); |
| } |