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 1e29b9f5b4d582a7e1576b1537dffd44e2b05e98..e9b01ae97b7b527073bd27ebbbbb4d197122e100 100644 |
| --- a/chrome/browser/ui/views/download/download_item_view_md.cc |
| +++ b/chrome/browser/ui/views/download/download_item_view_md.cc |
| @@ -161,7 +161,8 @@ class DownloadItemViewMd::DropDownButton : public BarControlButton { |
| // Promoted visibility to public. |
| void AnimateInkDrop(views::InkDropState state) { |
| - BarControlButton::AnimateInkDrop(state); |
| + // TODO(bruthig): Plumb in the proper Event. |
| + BarControlButton::AnimateInkDrop(state, nullptr /* event */); |
| } |
| private: |
| @@ -409,7 +410,7 @@ bool DownloadItemViewMd::OnMouseDragged(const ui::MouseEvent& event) { |
| if (!starting_drag_) { |
| starting_drag_ = true; |
| drag_start_point_ = event.location(); |
| - AnimateInkDrop(views::InkDropState::HIDDEN); |
| + AnimateInkDrop(views::InkDropState::HIDDEN, &event); |
| } |
| if (dragging_) { |
| if (download()->GetState() == DownloadItem::COMPLETE) { |
| @@ -450,7 +451,7 @@ bool DownloadItemViewMd::OnKeyPressed(const ui::KeyEvent& event) { |
| if (event.key_code() == ui::VKEY_SPACE || |
| event.key_code() == ui::VKEY_RETURN) { |
| // OpenDownload may delete this, so don't add any code after this line. |
| - OpenDownload(); |
| + OpenDownload(event); |
| return true; |
| } |
| return false; |
| @@ -492,7 +493,7 @@ void DownloadItemViewMd::AddInkDropLayer(ui::Layer* ink_drop_layer) { |
| std::unique_ptr<views::InkDropRipple> DownloadItemViewMd::CreateInkDropRipple() |
| const { |
| return base::WrapUnique(new views::FloodFillInkDropRipple( |
| - GetLocalBounds(), GetLocalBounds().CenterPoint(), |
| + GetLocalBounds(), GetInkDropCenterBasedOnLastEvent(), |
| color_utils::DeriveDefaultIconColor(GetTextColor()))); |
| } |
| @@ -747,7 +748,7 @@ void DownloadItemViewMd::OnBlur() { |
| SchedulePaint(); |
| } |
| -void DownloadItemViewMd::OpenDownload() { |
| +void DownloadItemViewMd::OpenDownload(const ui::Event& event) { |
| DCHECK(!IsShowingWarningDialog()); |
| // We're interested in how long it takes users to open downloads. If they |
| // open downloads super quickly, we should be concerned about clickjacking. |
| @@ -755,7 +756,7 @@ void DownloadItemViewMd::OpenDownload() { |
| base::Time::Now() - creation_time_); |
| UpdateAccessibleName(); |
| - AnimateInkDrop(views::InkDropState::ACTION_TRIGGERED); |
| + AnimateInkDrop(views::InkDropState::ACTION_TRIGGERED, &event); |
|
Evan Stade
2016/06/14 21:13:24
I'd just as soon move this out to the two OpenDown
bruthig
2016/06/14 21:57:01
Done.
|
| // Calling download()->OpenDownload may delete this, so this must be |
| // the last thing we do. |
| @@ -855,7 +856,7 @@ void DownloadItemViewMd::HandlePressEvent(const ui::LocatedEvent& event, |
| if (!active_event) |
| return; |
| - AnimateInkDrop(views::InkDropState::ACTION_PENDING); |
| + AnimateInkDrop(views::InkDropState::ACTION_PENDING, &event); |
| } |
| void DownloadItemViewMd::HandleClickEvent(const ui::LocatedEvent& event, |
| @@ -868,7 +869,7 @@ void DownloadItemViewMd::HandleClickEvent(const ui::LocatedEvent& event, |
| return; |
| // OpenDownload may delete this, so don't add any code after this line. |
| - OpenDownload(); |
| + OpenDownload(event); |
| } |
| void DownloadItemViewMd::SetDropdownState(State new_state) { |