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

Unified Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc

Issue 2001843002: Use ink drop hover for focus states on toolbar buttons and location (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: layout Created 4 years, 7 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/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 790bbaebe264bf6e6a5998ca40e420ddf79e412e..1d87919c8f7921cbf5d859d9ad397f10298b1016 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
@@ -204,9 +204,10 @@ class BookmarkButtonBase : public views::LabelButton {
public:
BookmarkButtonBase(views::ButtonListener* listener,
const base::string16& title)
- : LabelButton(listener, title), ink_drop_delegate_(this, this) {
+ : LabelButton(listener, title) {
SetElideBehavior(kElideBehavior);
- set_ink_drop_delegate(&ink_drop_delegate_);
+ set_ink_drop_delegate(
+ base::WrapUnique(new views::ButtonInkDropDelegate(this, this)));
set_has_ink_drop_action_on_click(true);
show_animation_.reset(new gfx::SlideAnimation(this));
if (!animations_enabled) {
@@ -261,8 +262,6 @@ class BookmarkButtonBase : public views::LabelButton {
private:
std::unique_ptr<gfx::SlideAnimation> show_animation_;
- // Controls the visual feedback for the button state.
- views::ButtonInkDropDelegate ink_drop_delegate_;
DISALLOW_COPY_AND_ASSIGN(BookmarkButtonBase);
};
@@ -332,9 +331,9 @@ class BookmarkMenuButtonBase : public views::MenuButton {
BookmarkMenuButtonBase(const base::string16& title,
views::MenuButtonListener* menu_button_listener,
bool show_menu_marker)
- : MenuButton(title, menu_button_listener, show_menu_marker),
- ink_drop_delegate_(this, this) {
- set_ink_drop_delegate(&ink_drop_delegate_);
+ : MenuButton(title, menu_button_listener, show_menu_marker) {
+ set_ink_drop_delegate(
+ base::WrapUnique(new views::ButtonInkDropDelegate(this, this)));
}
std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override {
@@ -358,9 +357,6 @@ class BookmarkMenuButtonBase : public views::MenuButton {
}
private:
- // Controls the visual feedback for the button state.
- views::ButtonInkDropDelegate ink_drop_delegate_;
-
DISALLOW_COPY_AND_ASSIGN(BookmarkMenuButtonBase);
};
« no previous file with comments | « chrome/browser/ui/views/bar_control_button.cc ('k') | chrome/browser/ui/views/download/download_item_view_md.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698