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

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

Issue 2562803002: exo: Replace pointer based stylus and replace with touch based stylus (Closed)
Patch Set: rebase Created 4 years 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
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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 223
224 void DragMouseBy(int dx, int dy) { 224 void DragMouseBy(int dx, int dy) {
225 DragMouseTo(current_location_ + gfx::Vector2d(dx, dy)); 225 DragMouseTo(current_location_ + gfx::Vector2d(dx, dy));
226 } 226 }
227 227
228 // Generates events to move the mouse to the center of the window. 228 // Generates events to move the mouse to the center of the window.
229 void MoveMouseToCenterOf(EventTarget* window); 229 void MoveMouseToCenterOf(EventTarget* window);
230 230
231 // Enter pen-pointer mode, which will cause any generated mouse events to have 231 // Enter pen-pointer mode, which will cause any generated mouse events to have
232 // a pointer type ui::EventPointerType::POINTER_TYPE_PEN. 232 // a pointer type ui::EventPointerType::POINTER_TYPE_PEN.
233 void EnterPenPointerMode(); 233 void EnterPenPointerMode();
sadrul 2016/12/15 20:04:01 These should now be removed, right?
denniskempin 2016/12/15 21:16:49 It's still used by some tests. They could be trans
234 234
235 // Exit pen-pointer mode. Generated mouse events will use the default pointer 235 // Exit pen-pointer mode. Generated mouse events will use the default pointer
236 // type event. 236 // type event.
237 void ExitPenPointerMode(); 237 void ExitPenPointerMode();
238 238
239 // Set radius of touch PointerDetails. 239 // Set radius of touch PointerDetails.
240 void SetTouchRadius(float x, float y); 240 void SetTouchRadius(float x, float y);
241 241
242 // Set tilt of touch PointerDetails.
243 void SetTouchTilt(float x, float y);
244
245 // Set pointer type of touch PointerDetails.
246 void SetTouchPointerType(ui::EventPointerType type) {
247 touch_pointer_details_.pointer_type = type;
248 }
249
250 // Set force of touch PointerDetails.
251 void SetTouchForce(float force) { touch_pointer_details_.force = force; }
252
242 // Generates a touch press event. 253 // Generates a touch press event.
243 void PressTouch(); 254 void PressTouch();
244 255
245 // Generates a touch press event with |touch_id|. 256 // Generates a touch press event with |touch_id|.
246 void PressTouchId(int touch_id); 257 void PressTouchId(int touch_id);
247 258
248 // Generates a ET_TOUCH_MOVED event to |point|. 259 // Generates a ET_TOUCH_MOVED event to |point|.
249 void MoveTouch(const gfx::Point& point); 260 void MoveTouch(const gfx::Point& point);
250 261
251 // Generates a ET_TOUCH_MOVED event moving by (x, y) from current location. 262 // Generates a ET_TOUCH_MOVED event moving by (x, y) from current location.
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 Target target_; 449 Target target_;
439 std::unique_ptr<base::TickClock> tick_clock_; 450 std::unique_ptr<base::TickClock> tick_clock_;
440 451
441 DISALLOW_COPY_AND_ASSIGN(EventGenerator); 452 DISALLOW_COPY_AND_ASSIGN(EventGenerator);
442 }; 453 };
443 454
444 } // namespace test 455 } // namespace test
445 } // namespace ui 456 } // namespace ui
446 457
447 #endif // UI_EVENTS_TEST_EVENT_GENERATOR_H_ 458 #endif // UI_EVENTS_TEST_EVENT_GENERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698