Chromium Code Reviews| Index: chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc |
| diff --git a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc |
| index a8dc1224fda879c99215c43dc6f1668b9932346a..e6ab414efebafc5d4191020cba290c47245f39e1 100644 |
| --- a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc |
| +++ b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc |
| @@ -12,6 +12,7 @@ |
| #include "ui/gfx/canvas.h" |
| #include "ui/gfx/color_utils.h" |
| #include "ui/native_theme/native_theme.h" |
| +#include "ui/views/animation/ink_drop_hover.h" |
| #include "ui/views/controls/image_view.h" |
| #include "ui/views/painter.h" |
| @@ -139,6 +140,28 @@ void IconLabelBubbleView::OnNativeThemeChanged( |
| SetLabelBackgroundColor(background_color); |
| } |
| +void IconLabelBubbleView::AddInkDropLayer(ui::Layer* ink_drop_layer) { |
| + image()->SetPaintToLayer(true); |
| + image()->SetFillsBoundsOpaquely(false); |
| + InkDropHostView::AddInkDropLayer(ink_drop_layer); |
| +} |
| + |
| +void IconLabelBubbleView::RemoveInkDropLayer(ui::Layer* ink_drop_layer) { |
| + InkDropHostView::RemoveInkDropLayer(ink_drop_layer); |
| + image()->SetFillsBoundsOpaquely(true); |
|
sky
2016/02/25 00:38:32
this isn't needed (because you destroy the layer o
Evan Stade
2016/02/25 01:34:28
good call. This is a copy-pasta error so I've upda
sky
2016/02/25 02:26:55
Seems like a weird limitation on view and layer. T
|
| + image()->SetPaintToLayer(false); |
| +} |
| + |
| +scoped_ptr<views::InkDropHover> IconLabelBubbleView::CreateInkDropHover() |
| + const { |
| + // Location bar views don't show hover effect. |
| + return nullptr; |
| +} |
| + |
| +SkColor IconLabelBubbleView::GetInkDropBaseColor() const { |
| + return color_utils::DeriveDefaultIconColor(GetTextColor()); |
| +} |
| + |
| SkColor IconLabelBubbleView::GetParentBackgroundColor() const { |
| return ui::MaterialDesignController::IsModeMaterial() |
| ? GetNativeTheme()->GetSystemColor( |