Index: chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc |
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc |
index ac5249a0234e2c45c06ea66a49c986d368fc8d48..ce37e63e3dbf78cae113307a1998cf5fb894aa80 100644 |
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc |
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc |
@@ -90,6 +90,7 @@ |
#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/animation/ink_drop_mask.h" |
#include "ui/views/button_drag_utils.h" |
#include "ui/views/controls/button/label_button.h" |
#include "ui/views/controls/button/label_button_border.h" |
@@ -121,6 +122,9 @@ static const int kNewTabHorizontalPadding = 2; |
// Maximum size of buttons on the bookmark bar. |
static const int kMaxButtonWidth = 150; |
+// Corner radius for masking the ink drop effects on buttons. |
+static const int kInkDropCornerRadius = 2; |
+ |
// Number of pixels the attached bookmark bar overlaps with the toolbar. |
static const int kToolbarAttachedBookmarkBarOverlap = 3; |
@@ -242,6 +246,11 @@ class BookmarkButtonBase : public views::LabelButton { |
bounds.size(), 0, bounds.CenterPoint(), GetInkDropBaseColor()); |
} |
+ std::unique_ptr<views::InkDropMask> CreateInkDropMask() const override { |
+ return base::MakeUnique<views::RoundRectInkDropMask>(size(), kInkDropInsets, |
+ kInkDropCornerRadius); |
+ } |
+ |
SkColor GetInkDropBaseColor() const override { |
return GetThemeProvider()->GetColor( |
ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON); |
@@ -367,6 +376,11 @@ class BookmarkMenuButtonBase : public views::MenuButton { |
bounds.size(), 0, bounds.CenterPoint(), GetInkDropBaseColor()); |
} |
+ std::unique_ptr<views::InkDropMask> CreateInkDropMask() const override { |
+ return base::MakeUnique<views::RoundRectInkDropMask>(size(), kInkDropInsets, |
+ kInkDropCornerRadius); |
+ } |
+ |
SkColor GetInkDropBaseColor() const override { |
return GetThemeProvider()->GetColor( |
ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON); |