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

Unified Diff: chrome/browser/ui/views/toolbar/toolbar_action_view.cc

Issue 1478303003: Converted all Views to use an InkDropDelegate instead of a InkDropAnimationController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merged with master / https://codereview.chromium.org/1494433003. Created 5 years 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/toolbar/toolbar_action_view.cc
diff --git a/chrome/browser/ui/views/toolbar/toolbar_action_view.cc b/chrome/browser/ui/views/toolbar/toolbar_action_view.cc
index e11905b73c53ffe2e8459523ec144913f83f1fbe..76203febaa341bdc18e3d2cf2365449a19adbe95 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_action_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_action_view.cc
@@ -108,8 +108,8 @@ ToolbarActionView::~ToolbarActionView() {
if (context_menu_owner == this)
context_menu_owner = nullptr;
view_controller_->SetDelegate(nullptr);
- ink_drop_delegate_.reset();
set_ink_drop_delegate(nullptr);
+ ink_drop_delegate_.reset();
}
void ToolbarActionView::GetAccessibleState(ui::AXViewState* state) {
@@ -226,8 +226,12 @@ gfx::Size ToolbarActionView::GetPreferredSize() const {
bool ToolbarActionView::OnMousePressed(const ui::MouseEvent& event) {
// views::MenuButton actions are only triggered by left mouse clicks.
- if (event.IsOnlyLeftMouseButton())
+ if (event.IsOnlyLeftMouseButton()) {
+ // TODO(bruthig): The ACTION_PENDING triggering logic should be in
+ // MenuButton::OnPressed() however there is a bug with the pressed state
+ // logic in MenuButton. See http://crbug.com/567252.
ink_drop_delegate()->OnAction(views::InkDropState::ACTION_PENDING);
+ }
return MenuButton::OnMousePressed(event);
}

Powered by Google App Engine
This is Rietveld 408576698