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

Side by Side Diff: ui/events/test/cocoa_test_event_utils.h

Issue 2101903002: MacViews: Modify cocoa_test_event_utils::SynthesizeKeyEvent to use the correct event timestamp value (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Correct header order. Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | ui/events/test/cocoa_test_event_utils.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_EVENTS_TEST_COCOA_TEST_EVENT_UTILS_H_ 5 #ifndef UI_EVENTS_TEST_COCOA_TEST_EVENT_UTILS_H_
6 #define UI_EVENTS_TEST_COCOA_TEST_EVENT_UTILS_H_ 6 #define UI_EVENTS_TEST_COCOA_TEST_EVENT_UTILS_H_
7 7
8 #import <Cocoa/Cocoa.h>
9 #import <objc/objc-class.h>
10
8 #include <utility> 11 #include <utility>
9 12
10 #import <objc/objc-class.h>
11
12 #include "ui/events/keycodes/dom/dom_key.h" 13 #include "ui/events/keycodes/dom/dom_key.h"
13 #include "ui/events/keycodes/keyboard_codes.h" 14 #include "ui/events/keycodes/keyboard_codes.h"
14 15
15 namespace cocoa_test_event_utils { 16 namespace cocoa_test_event_utils {
16 17
17 // Create synthetic mouse events for testing. Currently these are very 18 // Create synthetic mouse events for testing. Currently these are very
18 // basic, flesh out as needed. Points are all in window coordinates; 19 // basic, flesh out as needed. Points are all in window coordinates;
19 // where the window is not specified, coordinate system is undefined 20 // where the window is not specified, coordinate system is undefined
20 // (but will be repeated when the event is queried). 21 // (but will be repeated when the event is queried).
21 NSEvent* MouseEventAtPoint(NSPoint point, NSEventType type, 22 NSEvent* MouseEventAtPoint(NSPoint point, NSEventType type,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // Creates a key event in a particular window. 68 // Creates a key event in a particular window.
68 NSEvent* SynthesizeKeyEvent(NSWindow* window, 69 NSEvent* SynthesizeKeyEvent(NSWindow* window,
69 bool keyDown, 70 bool keyDown,
70 ui::KeyboardCode keycode, 71 ui::KeyboardCode keycode,
71 NSUInteger flags, 72 NSUInteger flags,
72 ui::DomKey dom_key = ui::DomKey::NONE); 73 ui::DomKey dom_key = ui::DomKey::NONE);
73 74
74 } // namespace cocoa_test_event_utils 75 } // namespace cocoa_test_event_utils
75 76
76 #endif // UI_EVENTS_TEST_COCOA_TEST_EVENT_UTILS_H_ 77 #endif // UI_EVENTS_TEST_COCOA_TEST_EVENT_UTILS_H_
OLDNEW
« no previous file with comments | « no previous file | ui/events/test/cocoa_test_event_utils.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698