OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |