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

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

Issue 2439953005: Support NSFlagsChanged in ui::EventFromNative. (Closed)
Patch Set: 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
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..7267693c027abc3ef2d49dd0bd600b94887c238d 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 == true means Shift is pressed and |key_code| == kVK_Shift
tapted 2016/10/25 06:55:10 nit: `|modifiers| & NSShiftKeyMask == true` -> `(|
alshabalin 2016/10/28 19:58:14 Done.
+// with |modifiers| & NSShiftKeyMask == false means Shift is released.
tapted 2016/10/25 06:55:10 `|modifiers| & NSShiftKeyMask == false` -> `(|modi
alshabalin 2016/10/28 19:58:14 Done.
+NSEvent* KeyEventWithModifierOnly(unsigned short key_code,
+ NSUInteger modifiers);
+
// Returns a mouse enter event.
NSEvent* EnterEvent();

Powered by Google App Engine
This is Rietveld 408576698