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

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

Issue 916523003: Bring up fast user switcher on right-click of the avatar menu on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unit testing Avatar Button Created 5 years, 10 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 6f6beb0337da59eda6a7ce5eba7e55f308e60c85..1f795bd4b265e5861eecc1059d88ce25144d0af9 100644
--- a/ui/events/test/cocoa_test_event_utils.h
+++ b/ui/events/test/cocoa_test_event_utils.h
@@ -18,6 +18,10 @@ namespace cocoa_test_event_utils {
// basic, flesh out as needed. Points are all in window coordinates;
// where the window is not specified, coordinate system is undefined
// (but will be repeated when the event is queried).
+NSEvent* MouseEventAtPointInWindow(NSPoint point,
Robert Sesek 2015/02/19 21:54:21 Header order should match impl.
anthonyvd 2015/02/20 18:50:48 Done.
+ NSEventType type,
+ NSWindow* window,
+ NSUInteger clickCount);
NSEvent* MouseEventWithType(NSEventType type, NSUInteger modifiers);
NSEvent* MouseEventAtPoint(NSPoint point, NSEventType type,
NSUInteger modifiers);
@@ -31,6 +35,11 @@ NSEvent* RightMouseDownAtPointInWindow(NSPoint point, NSWindow* window);
std::pair<NSEvent*, NSEvent*> MouseClickInView(NSView* view,
NSUInteger clickCount);
+// Return a right mouse down and an up event with the given |clickCount| at
+// |view|'s midpoint.
+std::pair<NSEvent*, NSEvent*> RightMouseClickInView(NSView* view,
+ NSUInteger clickCount);
+
// Returns a key event with the given character.
NSEvent* KeyEventWithCharacter(unichar c);

Powered by Google App Engine
This is Rietveld 408576698