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

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: 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 #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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 272
273 void EventGenerator::ExitPenPointerMode() { 273 void EventGenerator::ExitPenPointerMode() {
274 pen_pointer_mode_ = false; 274 pen_pointer_mode_ = false;
275 } 275 }
276 276
277 void EventGenerator::SetTouchRadius(float x, float y) { 277 void EventGenerator::SetTouchRadius(float x, float y) {
278 touch_pointer_details_.radius_x = x; 278 touch_pointer_details_.radius_x = x;
279 touch_pointer_details_.radius_y = y; 279 touch_pointer_details_.radius_y = y;
280 } 280 }
281 281
282 void EventGenerator::SetTouchTilt(float x, float y) {
283 touch_pointer_details_.tilt_x = x;
284 touch_pointer_details_.tilt_y = y;
285 }
286
282 void EventGenerator::PressTouch() { 287 void EventGenerator::PressTouch() {
283 PressTouchId(0); 288 PressTouchId(0);
284 } 289 }
285 290
286 void EventGenerator::PressTouchId(int touch_id) { 291 void EventGenerator::PressTouchId(int touch_id) {
287 TestTouchEvent touchev(ui::ET_TOUCH_PRESSED, GetLocationInCurrentRoot(), 292 TestTouchEvent touchev(ui::ET_TOUCH_PRESSED, GetLocationInCurrentRoot(),
288 touch_id, flags_, ui::EventTimeForNow()); 293 touch_id, flags_, ui::EventTimeForNow());
289 Dispatch(&touchev); 294 Dispatch(&touchev);
290 } 295 }
291 296
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 return default_delegate; 725 return default_delegate;
721 } 726 }
722 727
723 EventGeneratorDelegate* EventGenerator::delegate() { 728 EventGeneratorDelegate* EventGenerator::delegate() {
724 return const_cast<EventGeneratorDelegate*>( 729 return const_cast<EventGeneratorDelegate*>(
725 const_cast<const EventGenerator*>(this)->delegate()); 730 const_cast<const EventGenerator*>(this)->delegate());
726 } 731 }
727 732
728 } // namespace test 733 } // namespace test
729 } // namespace ui 734 } // namespace ui
OLDNEW
« ui/events/test/event_generator.h ('K') | « ui/events/test/event_generator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698