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 "content/browser/renderer_host/render_widget_host_impl.h" | 5 #include "content/browser/renderer_host/render_widget_host_impl.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 2036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2047 if (!event.latency.FindLatency( | 2047 if (!event.latency.FindLatency( |
2048 ui::INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_COMPONENT, 0, NULL)) { | 2048 ui::INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_COMPONENT, 0, NULL)) { |
2049 // GestureEvent latency ends when it is acked but does not cause any | 2049 // GestureEvent latency ends when it is acked but does not cause any |
2050 // rendering scheduled. | 2050 // rendering scheduled. |
2051 ui::LatencyInfo latency = event.latency; | 2051 ui::LatencyInfo latency = event.latency; |
2052 latency.AddLatencyNumber( | 2052 latency.AddLatencyNumber( |
2053 ui::INPUT_EVENT_LATENCY_TERMINATED_GESTURE_COMPONENT, 0 ,0); | 2053 ui::INPUT_EVENT_LATENCY_TERMINATED_GESTURE_COMPONENT, 0 ,0); |
2054 } | 2054 } |
2055 | 2055 |
2056 if (view_) | 2056 if (view_) |
2057 view_->GestureEventAck(event.event.type, ack_result); | 2057 view_->GestureEventAck(event.event, ack_result); |
2058 } | 2058 } |
2059 | 2059 |
2060 void RenderWidgetHostImpl::OnTouchEventAck( | 2060 void RenderWidgetHostImpl::OnTouchEventAck( |
2061 const TouchEventWithLatencyInfo& event, | 2061 const TouchEventWithLatencyInfo& event, |
2062 InputEventAckState ack_result) { | 2062 InputEventAckState ack_result) { |
2063 TouchEventWithLatencyInfo touch_event = event; | 2063 TouchEventWithLatencyInfo touch_event = event; |
2064 // TouchEvent latency does not end when acked since it could later on | 2064 // TouchEvent latency does not end when acked since it could later on |
2065 // become gesture events. | 2065 // become gesture events. |
2066 touch_event.latency.AddLatencyNumber( | 2066 touch_event.latency.AddLatencyNumber( |
2067 ui::INPUT_EVENT_LATENCY_ACKED_TOUCH_COMPONENT, 0, 0); | 2067 ui::INPUT_EVENT_LATENCY_ACKED_TOUCH_COMPONENT, 0, 0); |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2506 } | 2506 } |
2507 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(rwh); | 2507 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(rwh); |
2508 if (rwhi_set.insert(rwhi).second) | 2508 if (rwhi_set.insert(rwhi).second) |
2509 rwhi->FrameSwapped(latency_info[i]); | 2509 rwhi->FrameSwapped(latency_info[i]); |
2510 } | 2510 } |
2511 } | 2511 } |
2512 } | 2512 } |
2513 } | 2513 } |
2514 | 2514 |
2515 } // namespace content | 2515 } // namespace content |
OLD | NEW |