Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(960)

Unified Diff: chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc

Issue 1724963002: Color the ink drop ripple and hover effects based on theming. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sky review Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 54d1334fa1a825426e5f16cefec0c6b2f3bf551b..f58d84659ec85f466d051d0b56d8b8710343136d 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/border.h"
#include "ui/views/controls/image_view.h"
#include "ui/views/painter.h"
@@ -148,6 +149,27 @@ 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()->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(
« no previous file with comments | « chrome/browser/ui/views/location_bar/icon_label_bubble_view.h ('k') | chrome/browser/ui/views/toolbar/app_menu_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698