| 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 "content/browser/renderer_host/input/input_router_impl.h" | 5 #include "content/browser/renderer_host/input/input_router_impl.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 if (modeString != "") | 97 if (modeString != "") |
| 98 LOG(ERROR) << "Invalid --touch-scrolling-mode option: " << modeString; | 98 LOG(ERROR) << "Invalid --touch-scrolling-mode option: " << modeString; |
| 99 return TouchEventQueue::TOUCH_SCROLLING_MODE_DEFAULT; | 99 return TouchEventQueue::TOUCH_SCROLLING_MODE_DEFAULT; |
| 100 } | 100 } |
| 101 | 101 |
| 102 GestureEventWithLatencyInfo MakeGestureEvent(WebInputEvent::Type type, | 102 GestureEventWithLatencyInfo MakeGestureEvent(WebInputEvent::Type type, |
| 103 double timestamp_seconds, | 103 double timestamp_seconds, |
| 104 int x, | 104 int x, |
| 105 int y, | 105 int y, |
| 106 int modifiers, | 106 int modifiers, |
| 107 const ui::LatencyInfo latency) { | 107 const ui::LatencyInfo& latency) { |
| 108 WebGestureEvent result; | 108 WebGestureEvent result; |
| 109 | 109 |
| 110 result.type = type; | 110 result.type = type; |
| 111 result.x = x; | 111 result.x = x; |
| 112 result.y = y; | 112 result.y = y; |
| 113 result.sourceDevice = WebGestureEvent::Touchscreen; | 113 result.sourceDevice = WebGestureEvent::Touchscreen; |
| 114 result.timeStampSeconds = timestamp_seconds; | 114 result.timeStampSeconds = timestamp_seconds; |
| 115 result.modifiers = modifiers; | 115 result.modifiers = modifiers; |
| 116 | 116 |
| 117 return GestureEventWithLatencyInfo(result, latency); | 117 return GestureEventWithLatencyInfo(result, latency); |
| (...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 805 touch_event_queue_->SetAckTimeoutEnabled(touch_ack_timeout_enabled, | 805 touch_event_queue_->SetAckTimeoutEnabled(touch_ack_timeout_enabled, |
| 806 touch_ack_timeout_delay_); | 806 touch_ack_timeout_delay_); |
| 807 } | 807 } |
| 808 | 808 |
| 809 bool InputRouterImpl::IsInOverscrollGesture() const { | 809 bool InputRouterImpl::IsInOverscrollGesture() const { |
| 810 OverscrollController* controller = client_->GetOverscrollController(); | 810 OverscrollController* controller = client_->GetOverscrollController(); |
| 811 return controller && controller->overscroll_mode() != OVERSCROLL_NONE; | 811 return controller && controller->overscroll_mode() != OVERSCROLL_NONE; |
| 812 } | 812 } |
| 813 | 813 |
| 814 } // namespace content | 814 } // namespace content |
| OLD | NEW |