| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <math.h> | 5 #include <math.h> |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 SyntheticWebGestureEventBuilder::BuildFling(velocityX, | 239 SyntheticWebGestureEventBuilder::BuildFling(velocityX, |
| 240 velocityY, | 240 velocityY, |
| 241 sourceDevice)); | 241 sourceDevice)); |
| 242 } | 242 } |
| 243 | 243 |
| 244 void SetTouchTimestamp(base::TimeDelta timestamp) { | 244 void SetTouchTimestamp(base::TimeDelta timestamp) { |
| 245 touch_event_.SetTimestamp(timestamp); | 245 touch_event_.SetTimestamp(timestamp); |
| 246 } | 246 } |
| 247 | 247 |
| 248 void SendTouchEvent() { | 248 void SendTouchEvent() { |
| 249 // Always set this bit to avoid otherwise unexpected touchmove suppression |
| 250 // by the TouchEventQueue. |
| 251 touch_event_.causesScrollingIfUncanceled = |
| 252 touch_event_.type == WebInputEvent::TouchMove; |
| 249 input_router_->SendTouchEvent( | 253 input_router_->SendTouchEvent( |
| 250 TouchEventWithLatencyInfo(touch_event_, ui::LatencyInfo())); | 254 TouchEventWithLatencyInfo(touch_event_, ui::LatencyInfo())); |
| 251 touch_event_.ResetPoints(); | 255 touch_event_.ResetPoints(); |
| 252 } | 256 } |
| 253 | 257 |
| 254 int PressTouchPoint(int x, int y) { | 258 int PressTouchPoint(int x, int y) { |
| 255 return touch_event_.PressPoint(x, y); | 259 return touch_event_.PressPoint(x, y); |
| 256 } | 260 } |
| 257 | 261 |
| 258 void MoveTouchPoint(int index, int x, int y) { | 262 void MoveTouchPoint(int index, int x, int y) { |
| (...skipping 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1899 client_overscroll = client_->GetAndResetOverscroll(); | 1903 client_overscroll = client_->GetAndResetOverscroll(); |
| 1900 EXPECT_EQ(wheel_overscroll.accumulated_overscroll, | 1904 EXPECT_EQ(wheel_overscroll.accumulated_overscroll, |
| 1901 client_overscroll.accumulated_overscroll); | 1905 client_overscroll.accumulated_overscroll); |
| 1902 EXPECT_EQ(wheel_overscroll.latest_overscroll_delta, | 1906 EXPECT_EQ(wheel_overscroll.latest_overscroll_delta, |
| 1903 client_overscroll.latest_overscroll_delta); | 1907 client_overscroll.latest_overscroll_delta); |
| 1904 EXPECT_EQ(wheel_overscroll.current_fling_velocity, | 1908 EXPECT_EQ(wheel_overscroll.current_fling_velocity, |
| 1905 client_overscroll.current_fling_velocity); | 1909 client_overscroll.current_fling_velocity); |
| 1906 } | 1910 } |
| 1907 | 1911 |
| 1908 } // namespace content | 1912 } // namespace content |
| OLD | NEW |