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

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

Issue 2447523002: [ash-md] Added different highlighting modes to the InkDropImpl. (Closed)
Patch Set: Fixed InkDropHostView::GetInkDrop() to use CreateInkDrop(). Created 4 years, 1 month 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
« no previous file with comments | « ash/common/system/tray/system_menu_button.cc ('k') | chrome/browser/ui/views/download/download_item_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 877e73bd1b05f7847e8e792934e641e602b65bb8..ec0a26ef567b0f0cc84466e80de9c5f478619ddc 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
@@ -89,6 +89,7 @@
#include "ui/resources/grit/ui_resources.h"
#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/button_drag_utils.h"
#include "ui/views/controls/button/label_button.h"
#include "ui/views/controls/button/label_button_border.h"
@@ -214,6 +215,11 @@ class BookmarkButtonBase : public views::LabelButton {
event_utils::IsPossibleDispositionEvent(e);
}
+ // LabelButton:
+ std::unique_ptr<views::InkDrop> CreateInkDrop() override {
+ return CreateDefaultFloodFillInkDropImpl();
+ }
+
std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override {
return base::MakeUnique<views::FloodFillInkDropRipple>(
CalculateInkDropBounds(size()), GetInkDropCenterBasedOnLastEvent(),
@@ -222,9 +228,6 @@ class BookmarkButtonBase : public views::LabelButton {
std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight()
const override {
- if (!ShouldShowInkDropHighlight())
- return nullptr;
-
const gfx::Rect bounds = CalculateInkDropBounds(size());
return base::MakeUnique<views::InkDropHighlight>(
bounds.size(), 0, gfx::RectF(bounds).CenterPoint(),
@@ -313,6 +316,11 @@ class BookmarkMenuButtonBase : public views::MenuButton {
SetFocusPainter(nullptr);
}
+ // MenuButton:
+ std::unique_ptr<views::InkDrop> CreateInkDrop() override {
+ return CreateDefaultFloodFillInkDropImpl();
+ }
+
std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override {
return base::MakeUnique<views::FloodFillInkDropRipple>(
CalculateInkDropBounds(size()), GetInkDropCenterBasedOnLastEvent(),
@@ -321,9 +329,6 @@ class BookmarkMenuButtonBase : public views::MenuButton {
std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight()
const override {
- if (!ShouldShowInkDropHighlight())
- return nullptr;
-
const gfx::Rect bounds = CalculateInkDropBounds(size());
return base::MakeUnique<views::InkDropHighlight>(
bounds.size(), 0, gfx::RectF(bounds).CenterPoint(),
« no previous file with comments | « ash/common/system/tray/system_menu_button.cc ('k') | chrome/browser/ui/views/download/download_item_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698