Commit 0697b18f authored by Charlene Yan's avatar Charlene Yan Committed by Commit Bot

Update HoverButtons to trigger on both left and right click.

Bug: 997151
Change-Id: I8cac4c9f56a271201de62af0d250365372f1a95d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1784967Reviewed-by: default avatarPeter Boström <pbos@chromium.org>
Commit-Queue: Charlene Yan <cyan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#693412}
parent 24ffca24
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include "chrome/browser/ui/views/chrome_layout_provider.h" #include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/browser/ui/views/chrome_typography.h" #include "chrome/browser/ui/views/chrome_typography.h"
#include "chrome/browser/ui/views/hover_button_controller.h" #include "chrome/browser/ui/views/hover_button_controller.h"
#include "ui/events/event_constants.h"
#include "ui/gfx/color_palette.h" #include "ui/gfx/color_palette.h"
#include "ui/gfx/paint_vector_icon.h" #include "ui/gfx/paint_vector_icon.h"
#include "ui/views/animation/ink_drop_impl.h" #include "ui/views/animation/ink_drop_impl.h"
...@@ -87,6 +88,8 @@ HoverButton::HoverButton(views::ButtonListener* button_listener, ...@@ -87,6 +88,8 @@ HoverButton::HoverButton(views::ButtonListener* button_listener,
SetInkDropMode(InkDropMode::ON); SetInkDropMode(InkDropMode::ON);
set_triggerable_event_flags(ui::EF_LEFT_MOUSE_BUTTON |
ui::EF_RIGHT_MOUSE_BUTTON);
button_controller()->set_notify_action( button_controller()->set_notify_action(
views::ButtonController::NotifyAction::NOTIFY_ON_RELEASE); views::ButtonController::NotifyAction::NOTIFY_ON_RELEASE);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment