| 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/synthetic_gesture_target_base.h" | 5 #include "content/browser/renderer_host/input/synthetic_gesture_target_base.h" |
| 6 | 6 |
| 7 #include "content/browser/renderer_host/render_widget_host_impl.h" | 7 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 8 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 8 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 9 #include "content/browser/renderer_host/ui_events_helper.h" | 9 #include "content/browser/renderer_host/ui_events_helper.h" |
| 10 #include "content/common/input_messages.h" | 10 #include "content/common/input_messages.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 RenderWidgetHostImpl* host) | 35 RenderWidgetHostImpl* host) |
| 36 : host_(host) { | 36 : host_(host) { |
| 37 DCHECK(host); | 37 DCHECK(host); |
| 38 } | 38 } |
| 39 | 39 |
| 40 SyntheticGestureTargetBase::~SyntheticGestureTargetBase() { | 40 SyntheticGestureTargetBase::~SyntheticGestureTargetBase() { |
| 41 } | 41 } |
| 42 | 42 |
| 43 void SyntheticGestureTargetBase::DispatchInputEventToPlatform( | 43 void SyntheticGestureTargetBase::DispatchInputEventToPlatform( |
| 44 const WebInputEvent& event) { | 44 const WebInputEvent& event) { |
| 45 TRACE_EVENT1("benchmark", | 45 TRACE_EVENT1("input", |
| 46 "SyntheticGestureTarget::DispatchInputEventToPlatform", | 46 "SyntheticGestureTarget::DispatchInputEventToPlatform", |
| 47 "type", WebInputEventTraits::GetName(event.type)); | 47 "type", WebInputEventTraits::GetName(event.type)); |
| 48 | 48 |
| 49 ui::LatencyInfo latency_info; | 49 ui::LatencyInfo latency_info; |
| 50 latency_info.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_UI_COMPONENT, 0, 0); | 50 latency_info.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_UI_COMPONENT, 0, 0); |
| 51 | 51 |
| 52 if (WebInputEvent::isTouchEventType(event.type)) { | 52 if (WebInputEvent::isTouchEventType(event.type)) { |
| 53 DCHECK(SupportsSyntheticGestureSourceType( | 53 DCHECK(SupportsSyntheticGestureSourceType( |
| 54 SyntheticGestureParams::TOUCH_INPUT)); | 54 SyntheticGestureParams::TOUCH_INPUT)); |
| 55 | 55 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 base::TimeDelta SyntheticGestureTargetBase::PointerAssumedStoppedTime() | 116 base::TimeDelta SyntheticGestureTargetBase::PointerAssumedStoppedTime() |
| 117 const { | 117 const { |
| 118 return base::TimeDelta::FromMilliseconds(kPointerAssumedStoppedTimeMs); | 118 return base::TimeDelta::FromMilliseconds(kPointerAssumedStoppedTimeMs); |
| 119 } | 119 } |
| 120 | 120 |
| 121 int SyntheticGestureTargetBase::GetTouchSlopInDips() const { | 121 int SyntheticGestureTargetBase::GetTouchSlopInDips() const { |
| 122 return kTouchSlopInDips; | 122 return kTouchSlopInDips; |
| 123 } | 123 } |
| 124 | 124 |
| 125 } // namespace content | 125 } // namespace content |
| OLD | NEW |