OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/memory/shared_memory.h" | 9 #include "base/memory/shared_memory.h" |
10 #include "base/timer/timer.h" | 10 #include "base/timer/timer.h" |
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
736 | 736 |
737 void SimulateGestureScrollUpdateEvent(float dX, float dY, int modifiers) { | 737 void SimulateGestureScrollUpdateEvent(float dX, float dY, int modifiers) { |
738 SimulateGestureEventCore( | 738 SimulateGestureEventCore( |
739 SyntheticWebGestureEventBuilder::BuildScrollUpdate(dX, dY, modifiers)); | 739 SyntheticWebGestureEventBuilder::BuildScrollUpdate(dX, dY, modifiers)); |
740 } | 740 } |
741 | 741 |
742 void SimulateGesturePinchUpdateEvent(float scale, | 742 void SimulateGesturePinchUpdateEvent(float scale, |
743 float anchorX, | 743 float anchorX, |
744 float anchorY, | 744 float anchorY, |
745 int modifiers) { | 745 int modifiers) { |
746 SimulateGestureEventCore( | 746 SimulateGestureEventCore(SyntheticWebGestureEventBuilder::BuildPinchUpdate( |
747 SyntheticWebGestureEventBuilder::BuildPinchUpdate(scale, | 747 scale, anchorX, anchorY, modifiers, WebGestureEvent::Touchscreen)); |
748 anchorX, | |
749 anchorY, | |
750 modifiers)); | |
751 } | 748 } |
752 | 749 |
753 // Inject synthetic GestureFlingStart events. | 750 // Inject synthetic GestureFlingStart events. |
754 void SimulateGestureFlingStartEvent( | 751 void SimulateGestureFlingStartEvent( |
755 float velocityX, | 752 float velocityX, |
756 float velocityY, | 753 float velocityY, |
757 WebGestureEvent::SourceDevice sourceDevice) { | 754 WebGestureEvent::SourceDevice sourceDevice) { |
758 SimulateGestureEventCore( | 755 SimulateGestureEventCore( |
759 SyntheticWebGestureEventBuilder::BuildFling(velocityX, | 756 SyntheticWebGestureEventBuilder::BuildFling(velocityX, |
760 velocityY, | 757 velocityY, |
(...skipping 1917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2678 | 2675 |
2679 // Tests RWHI::ForwardTouchEventWithLatencyInfo(). | 2676 // Tests RWHI::ForwardTouchEventWithLatencyInfo(). |
2680 PressTouchPoint(0, 1); | 2677 PressTouchPoint(0, 1); |
2681 SendTouchEvent(); | 2678 SendTouchEvent(); |
2682 CheckLatencyInfoComponentInMessage( | 2679 CheckLatencyInfoComponentInMessage( |
2683 process_, GetLatencyComponentId(), WebInputEvent::TouchStart); | 2680 process_, GetLatencyComponentId(), WebInputEvent::TouchStart); |
2684 SendInputEventACK(WebInputEvent::TouchStart, INPUT_EVENT_ACK_STATE_CONSUMED); | 2681 SendInputEventACK(WebInputEvent::TouchStart, INPUT_EVENT_ACK_STATE_CONSUMED); |
2685 } | 2682 } |
2686 | 2683 |
2687 } // namespace content | 2684 } // namespace content |
OLD | NEW |