| 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 e10f3332bd7874ac992719b7b7de84eca143af1c..409b40e81439171789cd66f7838a8d44861668c1 100644
|
| --- a/chrome/browser/ui/views/location_bar/bubble_icon_view.cc
|
| +++ b/chrome/browser/ui/views/location_bar/bubble_icon_view.cc
|
| @@ -152,6 +152,20 @@ void BubbleIconView::RemoveInkDropLayer(ui::Layer* ink_drop_layer) {
|
| image_->SetPaintToLayer(false);
|
| }
|
|
|
| +gfx::Point BubbleIconView::CalculateInkDropCenter() const {
|
| + return GetLocalBounds().CenterPoint();
|
| +}
|
| +
|
| +bool BubbleIconView::ShouldShowInkDropHover() const {
|
| + // BubbleIconView views don't show hover effect.
|
| + return false;
|
| +}
|
| +
|
| +SkColor BubbleIconView::GetInkDropBaseColor() const {
|
| + return color_utils::DeriveDefaultIconColor(GetNativeTheme()->GetSystemColor(
|
| + ui::NativeTheme::kColorId_TextfieldDefaultColor));
|
| +}
|
| +
|
| void BubbleIconView::OnWidgetDestroying(views::Widget* widget) {
|
| widget->RemoveObserver(this);
|
| }
|
| @@ -184,27 +198,16 @@ void BubbleIconView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
|
| ink_drop_delegate_->OnLayout();
|
| }
|
|
|
| -gfx::Point BubbleIconView::CalculateInkDropCenter() const {
|
| - return GetLocalBounds().CenterPoint();
|
| -}
|
| -
|
| -bool BubbleIconView::ShouldShowInkDropHover() const {
|
| - // BubbleIconView views don't show hover effect.
|
| - return false;
|
| -}
|
| -
|
| void BubbleIconView::UpdateIcon() {
|
| if (SetRasterIcon())
|
| return;
|
|
|
| const int icon_size =
|
| ui::MaterialDesignController::IsModeMaterial() ? 16 : 18;
|
| - const ui::NativeTheme* theme = GetNativeTheme();
|
| - SkColor icon_color =
|
| - active_
|
| - ? theme->GetSystemColor(ui::NativeTheme::kColorId_CallToActionColor)
|
| - : color_utils::DeriveDefaultIconColor(theme->GetSystemColor(
|
| - ui::NativeTheme::kColorId_TextfieldDefaultColor));
|
| + SkColor icon_color = active_
|
| + ? GetNativeTheme()->GetSystemColor(
|
| + ui::NativeTheme::kColorId_CallToActionColor)
|
| + : GetInkDropBaseColor();
|
| image_->SetImage(
|
| gfx::CreateVectorIcon(GetVectorIcon(), icon_size, icon_color));
|
| }
|
|
|