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

Unified Diff: ui/events/test/cocoa_test_event_utils.h

Issue 2439953005: Support NSFlagsChanged in ui::EventFromNative. (Closed)
Patch Set: Unify NSFlagsChanged handling between content and ui/events. Created 4 years, 2 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
« no previous file with comments | « ui/events/cocoa/events_mac_unittest.mm ('k') | ui/events/test/cocoa_test_event_utils.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/test/cocoa_test_event_utils.h
diff --git a/ui/events/test/cocoa_test_event_utils.h b/ui/events/test/cocoa_test_event_utils.h
index dbb538f570e98449f786c430a36127969d326aff..24c948f33d40ee652ab39fef7a705e7223f272b8 100644
--- a/ui/events/test/cocoa_test_event_utils.h
+++ b/ui/events/test/cocoa_test_event_utils.h
@@ -74,6 +74,13 @@ NSEvent* KeyEventWithKeyCode(unsigned short key_code,
NSEventType event_type,
NSUInteger modifiers);
+// Returns a key event for pressing or releasing a modifier key (aka
+// NSFlagsChanged). For example |key_code| == kVK_Shift with (|modifiers| &
+// NSShiftKeyMask) != 0 means Shift is pressed and |key_code| == kVK_Shift
+// with (|modifiers| & NSShiftKeyMask) == 0 means Shift is released.
+NSEvent* KeyEventWithModifierOnly(unsigned short key_code,
+ NSUInteger modifiers);
+
// Returns a mouse enter event.
NSEvent* EnterEvent();
« no previous file with comments | « ui/events/cocoa/events_mac_unittest.mm ('k') | ui/events/test/cocoa_test_event_utils.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698