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 1851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1862 InputEventAckState ack_result) { | 1862 InputEventAckState ack_result) { |
1863 if (!wheel_event.latency.FindLatency( | 1863 if (!wheel_event.latency.FindLatency( |
1864 ui::INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_COMPONENT, 0, NULL)) { | 1864 ui::INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_COMPONENT, 0, NULL)) { |
1865 // MouseWheelEvent latency ends when it is acked but does not cause any | 1865 // MouseWheelEvent latency ends when it is acked but does not cause any |
1866 // rendering scheduled. | 1866 // rendering scheduled. |
1867 ui::LatencyInfo latency = wheel_event.latency; | 1867 ui::LatencyInfo latency = wheel_event.latency; |
1868 latency.AddLatencyNumber( | 1868 latency.AddLatencyNumber( |
1869 ui::INPUT_EVENT_LATENCY_TERMINATED_MOUSE_COMPONENT, 0, 0); | 1869 ui::INPUT_EVENT_LATENCY_TERMINATED_MOUSE_COMPONENT, 0, 0); |
1870 } | 1870 } |
1871 | 1871 |
1872 const bool processed = (INPUT_EVENT_ACK_STATE_CONSUMED == ack_result); | 1872 bool consumed = (INPUT_EVENT_ACK_STATE_CONSUMED == ack_result); |
1873 if (!processed && !is_hidden() && view_) { | 1873 if (!is_hidden() && view_) { |
1874 if (!delegate_->HandleWheelEvent(wheel_event.event)) | 1874 if (!consumed) |
1875 view_->UnhandledWheelEvent(wheel_event.event); | 1875 consumed = delegate_->HandleWheelEvent(wheel_event.event); |
| 1876 view_->ProcessedWheelEvent(wheel_event.event, consumed); |
1876 } | 1877 } |
1877 } | 1878 } |
1878 | 1879 |
1879 void RenderWidgetHostImpl::OnGestureEventAck( | 1880 void RenderWidgetHostImpl::OnGestureEventAck( |
1880 const GestureEventWithLatencyInfo& event, | 1881 const GestureEventWithLatencyInfo& event, |
1881 InputEventAckState ack_result) { | 1882 InputEventAckState ack_result) { |
1882 if (!event.latency.FindLatency( | 1883 if (!event.latency.FindLatency( |
1883 ui::INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_COMPONENT, 0, NULL)) { | 1884 ui::INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_COMPONENT, 0, NULL)) { |
1884 // GestureEvent latency ends when it is acked but does not cause any | 1885 // GestureEvent latency ends when it is acked but does not cause any |
1885 // rendering scheduled. | 1886 // rendering scheduled. |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2327 } | 2328 } |
2328 } | 2329 } |
2329 | 2330 |
2330 SkBitmap::Config RenderWidgetHostImpl::PreferredReadbackFormat() { | 2331 SkBitmap::Config RenderWidgetHostImpl::PreferredReadbackFormat() { |
2331 if (view_) | 2332 if (view_) |
2332 return view_->PreferredReadbackFormat(); | 2333 return view_->PreferredReadbackFormat(); |
2333 return SkBitmap::kARGB_8888_Config; | 2334 return SkBitmap::kARGB_8888_Config; |
2334 } | 2335 } |
2335 | 2336 |
2336 } // namespace content | 2337 } // namespace content |
OLD | NEW |