| 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 touch_event_.defaultActionMayCauseScrolling = |
| 250 touch_event_.type == WebInputEvent::TouchMove; |
| 249 input_router_->SendTouchEvent( | 251 input_router_->SendTouchEvent( |
| 250 TouchEventWithLatencyInfo(touch_event_, ui::LatencyInfo())); | 252 TouchEventWithLatencyInfo(touch_event_, ui::LatencyInfo())); |
| 251 touch_event_.ResetPoints(); | 253 touch_event_.ResetPoints(); |
| 252 } | 254 } |
| 253 | 255 |
| 254 int PressTouchPoint(int x, int y) { | 256 int PressTouchPoint(int x, int y) { |
| 255 return touch_event_.PressPoint(x, y); | 257 return touch_event_.PressPoint(x, y); |
| 256 } | 258 } |
| 257 | 259 |
| 258 void MoveTouchPoint(int index, int x, int y) { | 260 void MoveTouchPoint(int index, int x, int y) { |
| (...skipping 1452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1711 client_overscroll = client_->GetAndResetOverscroll(); | 1713 client_overscroll = client_->GetAndResetOverscroll(); |
| 1712 EXPECT_EQ(wheel_overscroll.accumulated_overscroll, | 1714 EXPECT_EQ(wheel_overscroll.accumulated_overscroll, |
| 1713 client_overscroll.accumulated_overscroll); | 1715 client_overscroll.accumulated_overscroll); |
| 1714 EXPECT_EQ(wheel_overscroll.latest_overscroll_delta, | 1716 EXPECT_EQ(wheel_overscroll.latest_overscroll_delta, |
| 1715 client_overscroll.latest_overscroll_delta); | 1717 client_overscroll.latest_overscroll_delta); |
| 1716 EXPECT_EQ(wheel_overscroll.current_fling_velocity, | 1718 EXPECT_EQ(wheel_overscroll.current_fling_velocity, |
| 1717 client_overscroll.current_fling_velocity); | 1719 client_overscroll.current_fling_velocity); |
| 1718 } | 1720 } |
| 1719 | 1721 |
| 1720 } // namespace content | 1722 } // namespace content |
| OLD | NEW |