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 2026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2037 if (!event.latency.FindLatency( | 2037 if (!event.latency.FindLatency( |
2038 ui::INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_COMPONENT, 0, NULL)) { | 2038 ui::INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_COMPONENT, 0, NULL)) { |
2039 // GestureEvent latency ends when it is acked but does not cause any | 2039 // GestureEvent latency ends when it is acked but does not cause any |
2040 // rendering scheduled. | 2040 // rendering scheduled. |
2041 ui::LatencyInfo latency = event.latency; | 2041 ui::LatencyInfo latency = event.latency; |
2042 latency.AddLatencyNumber( | 2042 latency.AddLatencyNumber( |
2043 ui::INPUT_EVENT_LATENCY_TERMINATED_GESTURE_COMPONENT, 0 ,0); | 2043 ui::INPUT_EVENT_LATENCY_TERMINATED_GESTURE_COMPONENT, 0 ,0); |
2044 } | 2044 } |
2045 | 2045 |
2046 if (view_) | 2046 if (view_) |
2047 view_->GestureEventAck(event.event.type, ack_result); | 2047 view_->GestureEventAck(event.event, ack_result); |
2048 } | 2048 } |
2049 | 2049 |
2050 void RenderWidgetHostImpl::OnTouchEventAck( | 2050 void RenderWidgetHostImpl::OnTouchEventAck( |
2051 const TouchEventWithLatencyInfo& event, | 2051 const TouchEventWithLatencyInfo& event, |
2052 InputEventAckState ack_result) { | 2052 InputEventAckState ack_result) { |
2053 TouchEventWithLatencyInfo touch_event = event; | 2053 TouchEventWithLatencyInfo touch_event = event; |
2054 // TouchEvent latency does not end when acked since it could later on | 2054 // TouchEvent latency does not end when acked since it could later on |
2055 // become gesture events. | 2055 // become gesture events. |
2056 touch_event.latency.AddLatencyNumber( | 2056 touch_event.latency.AddLatencyNumber( |
2057 ui::INPUT_EVENT_LATENCY_ACKED_TOUCH_COMPONENT, 0, 0); | 2057 ui::INPUT_EVENT_LATENCY_ACKED_TOUCH_COMPONENT, 0, 0); |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2468 continue; | 2468 continue; |
2469 } | 2469 } |
2470 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(rwh); | 2470 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(rwh); |
2471 if (rwhi_set.insert(rwhi).second) | 2471 if (rwhi_set.insert(rwhi).second) |
2472 rwhi->FrameSwapped(latency_info); | 2472 rwhi->FrameSwapped(latency_info); |
2473 } | 2473 } |
2474 } | 2474 } |
2475 } | 2475 } |
2476 | 2476 |
2477 } // namespace content | 2477 } // namespace content |
OLD | NEW |