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

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

Issue 2053253002: Support a ui::test::EventGenerator constructed with a single argument on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update EventGenerator comment Created 4 years, 6 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/views/test/event_generator_delegate_mac.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_EVENT_GENERATOR_H_ 5 #ifndef UI_EVENTS_TEST_EVENT_GENERATOR_H_
6 #define UI_EVENTS_TEST_EVENT_GENERATOR_H_ 6 #define UI_EVENTS_TEST_EVENT_GENERATOR_H_
7 7
8 #include <list> 8 #include <list>
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // which uses the coordinates conversions and targeting provided by 115 // which uses the coordinates conversions and targeting provided by
116 // |delegate|. 116 // |delegate|.
117 explicit EventGenerator(EventGeneratorDelegate* delegate); 117 explicit EventGenerator(EventGeneratorDelegate* delegate);
118 118
119 // Creates an EventGenerator with the mouse/touch location 119 // Creates an EventGenerator with the mouse/touch location
120 // at |initial_location|, which uses the |root_window|'s coordinates. 120 // at |initial_location|, which uses the |root_window|'s coordinates.
121 EventGenerator(gfx::NativeWindow root_window, 121 EventGenerator(gfx::NativeWindow root_window,
122 const gfx::Point& initial_location); 122 const gfx::Point& initial_location);
123 123
124 // Creates an EventGenerator with the mouse/touch location centered over 124 // Creates an EventGenerator with the mouse/touch location centered over
125 // |window|. This is currently the only constructor that works on Mac, since 125 // |window|.
126 // a specific window is required (and there is no root window).
127 EventGenerator(gfx::NativeWindow root_window, gfx::NativeWindow window); 126 EventGenerator(gfx::NativeWindow root_window, gfx::NativeWindow window);
128 127
129 virtual ~EventGenerator(); 128 virtual ~EventGenerator();
130 129
131 // Explicitly sets the location used by mouse/touch events. This is set by the 130 // Explicitly sets the location used by mouse/touch events. This is set by the
132 // various methods that take a location but can be manipulated directly, 131 // various methods that take a location but can be manipulated directly,
133 // typically for touch. 132 // typically for touch.
134 void set_current_location(const gfx::Point& location) { 133 void set_current_location(const gfx::Point& location) {
135 current_location_ = location; 134 current_location_ = location;
136 } 135 }
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 bool targeting_application_; 407 bool targeting_application_;
409 std::unique_ptr<base::TickClock> tick_clock_; 408 std::unique_ptr<base::TickClock> tick_clock_;
410 409
411 DISALLOW_COPY_AND_ASSIGN(EventGenerator); 410 DISALLOW_COPY_AND_ASSIGN(EventGenerator);
412 }; 411 };
413 412
414 } // namespace test 413 } // namespace test
415 } // namespace ui 414 } // namespace ui
416 415
417 #endif // UI_EVENTS_TEST_EVENT_GENERATOR_H_ 416 #endif // UI_EVENTS_TEST_EVENT_GENERATOR_H_
OLDNEW
« no previous file with comments | « no previous file | ui/views/test/event_generator_delegate_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698