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

Unified Diff: ui/views/controls/button/custom_button.cc

Issue 101573006: Changes MouseEvent constructor to take changed_button_flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test; needs updated expectations as mouse entered wasnt sent before because of env::mouse_butto… Created 7 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: ui/views/controls/button/custom_button.cc
diff --git a/ui/views/controls/button/custom_button.cc b/ui/views/controls/button/custom_button.cc
index 2be2a2301e1dce9755e7dac8820baab0b05ef33e..cafa5a30c50b439c6d9067617dfadeb386de7891 100644
--- a/ui/views/controls/button/custom_button.cc
+++ b/ui/views/controls/button/custom_button.cc
@@ -199,6 +199,7 @@ bool CustomButton::OnKeyPressed(const ui::KeyEvent& event) {
ui::MouseEvent synthetic_event(ui::ET_MOUSE_RELEASED,
gfx::Point(),
gfx::Point(),
+ ui::EF_LEFT_MOUSE_BUTTON,
ui::EF_LEFT_MOUSE_BUTTON);
NotifyClick(synthetic_event);
} else {
@@ -216,6 +217,7 @@ bool CustomButton::OnKeyReleased(const ui::KeyEvent& event) {
ui::MouseEvent synthetic_event(ui::ET_MOUSE_RELEASED,
gfx::Point(),
gfx::Point(),
+ ui::EF_LEFT_MOUSE_BUTTON,
ui::EF_LEFT_MOUSE_BUTTON);
NotifyClick(synthetic_event);
return true;
@@ -260,6 +262,7 @@ bool CustomButton::AcceleratorPressed(const ui::Accelerator& accelerator) {
ui::MouseEvent synthetic_event(ui::ET_MOUSE_RELEASED,
gfx::Point(),
gfx::Point(),
+ ui::EF_LEFT_MOUSE_BUTTON,
ui::EF_LEFT_MOUSE_BUTTON);
NotifyClick(synthetic_event);
return true;
« no previous file with comments | « ui/message_center/views/notifier_settings_view.cc ('k') | ui/views/controls/button/custom_button_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698