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

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

Issue 2562803002: exo: Replace pointer based stylus and replace with touch based stylus (Closed)
Patch Set: updated deps in gn file 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
« no previous file with comments | « ui/events/test/event_generator.h ('k') | no next file » | 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 #include "ui/events/test/event_generator.h" 5 #include "ui/events/test/event_generator.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 void EventGenerator::ExitPenPointerMode() { 267 void EventGenerator::ExitPenPointerMode() {
268 touch_pointer_details_.pointer_type = 268 touch_pointer_details_.pointer_type =
269 ui::EventPointerType::POINTER_TYPE_TOUCH; 269 ui::EventPointerType::POINTER_TYPE_TOUCH;
270 } 270 }
271 271
272 void EventGenerator::SetTouchRadius(float x, float y) { 272 void EventGenerator::SetTouchRadius(float x, float y) {
273 touch_pointer_details_.radius_x = x; 273 touch_pointer_details_.radius_x = x;
274 touch_pointer_details_.radius_y = y; 274 touch_pointer_details_.radius_y = y;
275 } 275 }
276 276
277 void EventGenerator::SetTouchTilt(float x, float y) {
278 touch_pointer_details_.tilt_x = x;
279 touch_pointer_details_.tilt_y = y;
280 }
281
277 void EventGenerator::PressTouch() { 282 void EventGenerator::PressTouch() {
278 PressTouchId(0); 283 PressTouchId(0);
279 } 284 }
280 285
281 void EventGenerator::PressTouchId(int touch_id) { 286 void EventGenerator::PressTouchId(int touch_id) {
282 TestTouchEvent touchev(ui::ET_TOUCH_PRESSED, GetLocationInCurrentRoot(), 287 TestTouchEvent touchev(ui::ET_TOUCH_PRESSED, GetLocationInCurrentRoot(),
283 touch_id, flags_, ui::EventTimeForNow()); 288 touch_id, flags_, ui::EventTimeForNow());
284 Dispatch(&touchev); 289 Dispatch(&touchev);
285 } 290 }
286 291
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 return default_delegate; 717 return default_delegate;
713 } 718 }
714 719
715 EventGeneratorDelegate* EventGenerator::delegate() { 720 EventGeneratorDelegate* EventGenerator::delegate() {
716 return const_cast<EventGeneratorDelegate*>( 721 return const_cast<EventGeneratorDelegate*>(
717 const_cast<const EventGenerator*>(this)->delegate()); 722 const_cast<const EventGenerator*>(this)->delegate());
718 } 723 }
719 724
720 } // namespace test 725 } // namespace test
721 } // namespace ui 726 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/test/event_generator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698