Chromium Code Reviews| Index: chrome/browser/ui/views/location_bar/bubble_icon_view.cc |
| diff --git a/chrome/browser/ui/views/location_bar/bubble_icon_view.cc b/chrome/browser/ui/views/location_bar/bubble_icon_view.cc |
| index 2c95325f35c6e6c3de3802207742bdbb3e4f1f52..4492d4c74a7a712144e412a363f3fc388e54e811 100644 |
| --- a/chrome/browser/ui/views/location_bar/bubble_icon_view.cc |
| +++ b/chrome/browser/ui/views/location_bar/bubble_icon_view.cc |
| @@ -13,6 +13,7 @@ |
| #include "ui/gfx/color_utils.h" |
| #include "ui/gfx/paint_vector_icon.h" |
| #include "ui/native_theme/native_theme.h" |
| +#include "ui/views/animation/flood_fill_ink_drop_ripple.h" |
| #include "ui/views/animation/ink_drop_highlight.h" |
| #include "ui/views/animation/ink_drop_impl.h" |
| #include "ui/views/bubble/bubble_dialog_delegate.h" |
| @@ -152,7 +153,8 @@ void BubbleIconView::RemoveInkDropLayer(ui::Layer* ink_drop_layer) { |
| } |
| std::unique_ptr<views::InkDrop> BubbleIconView::CreateInkDrop() { |
| - std::unique_ptr<views::InkDropImpl> ink_drop = CreateDefaultInkDropImpl(); |
| + std::unique_ptr<views::InkDropImpl> ink_drop = |
| + CreateDefaultFloodFillInkDropImpl(); |
| ink_drop->SetShowHighlightOnFocus(true); |
| return std::move(ink_drop); |
| } |
| @@ -162,6 +164,14 @@ SkColor BubbleIconView::GetInkDropBaseColor() const { |
| ui::NativeTheme::kColorId_TextfieldDefaultColor)); |
| } |
| +std::unique_ptr<views::InkDropRipple> BubbleIconView::CreateInkDropRipple() |
| + const { |
| + return base::MakeUnique<views::FloodFillInkDropRipple>( |
| + gfx::Size(kDefaultInkDropSize, kDefaultInkDropSize), |
| + GetLocalBounds().CenterPoint(), GetInkDropBaseColor(), |
|
bruthig
2017/04/21 15:05:09
Was it an intentional decision to center the rippl
spqchan
2017/04/27 21:40:06
Nope, this method slipped past my radar
|
| + ink_drop_visible_opacity()); |
| +} |
| + |
| void BubbleIconView::OnGestureEvent(ui::GestureEvent* event) { |
| if (event->type() == ui::ET_GESTURE_TAP) { |
| AnimateInkDrop(views::InkDropState::ACTIVATED, event); |