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

Side by Side Diff: webkit/tools/test_shell/event_sending_controller.cc

Issue 4191008: Make EventSendingController honour leapForward for touch events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // This file contains the definition for EventSendingController. 5 // This file contains the definition for EventSendingController.
6 // 6 //
7 // Some notes about drag and drop handling: 7 // Some notes about drag and drop handling:
8 // Windows drag and drop goes through a system call to DoDragDrop. At that 8 // Windows drag and drop goes through a system call to DoDragDrop. At that
9 // point, program control is given to Windows which then periodically makes 9 // point, program control is given to Windows which then periodically makes
10 // callbacks into the webview. This won't work for layout tests, so instead, 10 // callbacks into the webview. This won't work for layout tests, so instead,
(...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 void EventSendingController::SendCurrentTouchEvent( 919 void EventSendingController::SendCurrentTouchEvent(
920 const WebInputEvent::Type type) { 920 const WebInputEvent::Type type) {
921 if (static_cast<unsigned int>(WebTouchEvent::touchPointsLengthCap) <= 921 if (static_cast<unsigned int>(WebTouchEvent::touchPointsLengthCap) <=
922 touch_points.size()) { 922 touch_points.size()) {
923 NOTREACHED() << "Too many touch points for event"; 923 NOTREACHED() << "Too many touch points for event";
924 } 924 }
925 925
926 WebTouchEvent touch_event; 926 WebTouchEvent touch_event;
927 touch_event.type = type; 927 touch_event.type = type;
928 touch_event.modifiers = touch_modifiers; 928 touch_event.modifiers = touch_modifiers;
929 touch_event.timeStampSeconds = GetCurrentEventTimeSec();
929 touch_event.touchPointsLength = touch_points.size(); 930 touch_event.touchPointsLength = touch_points.size();
930 for (unsigned int i = 0; i < touch_points.size(); ++i) { 931 for (unsigned int i = 0; i < touch_points.size(); ++i) {
931 touch_event.touchPoints[i] = touch_points[i]; 932 touch_event.touchPoints[i] = touch_points[i];
932 } 933 }
933 webview()->handleInputEvent(touch_event); 934 webview()->handleInputEvent(touch_event);
934 935
935 std::vector<WebTouchPoint>::iterator i = touch_points.begin(); 936 std::vector<WebTouchPoint>::iterator i = touch_points.begin();
936 while (i != touch_points.end()) { 937 while (i != touch_points.end()) {
937 WebTouchPoint* touch_point = &(*i); 938 WebTouchPoint* touch_point = &(*i);
938 if (touch_point->state == WebTouchPoint::StateReleased) { 939 if (touch_point->state == WebTouchPoint::StateReleased) {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 1013
1013 void EventSendingController::fireKeyboardEventsToElement( 1014 void EventSendingController::fireKeyboardEventsToElement(
1014 const CppArgumentList& args, CppVariant* result) { 1015 const CppArgumentList& args, CppVariant* result) {
1015 result->SetNull(); 1016 result->SetNull();
1016 } 1017 }
1017 1018
1018 void EventSendingController::clearKillRing( 1019 void EventSendingController::clearKillRing(
1019 const CppArgumentList& args, CppVariant* result) { 1020 const CppArgumentList& args, CppVariant* result) {
1020 result->SetNull(); 1021 result->SetNull();
1021 } 1022 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698