| 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_view_android.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_android.h" |
| 6 | 6 |
| 7 #include <android/bitmap.h> | 7 #include <android/bitmap.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 #include "content/browser/renderer_host/dip_util.h" | 53 #include "content/browser/renderer_host/dip_util.h" |
| 54 #include "content/browser/renderer_host/frame_metadata_util.h" | 54 #include "content/browser/renderer_host/frame_metadata_util.h" |
| 55 #include "content/browser/renderer_host/input/input_router_impl.h" | 55 #include "content/browser/renderer_host/input/input_router_impl.h" |
| 56 #include "content/browser/renderer_host/input/synthetic_gesture_target_android.h
" | 56 #include "content/browser/renderer_host/input/synthetic_gesture_target_android.h
" |
| 57 #include "content/browser/renderer_host/input/web_input_event_builders_android.h
" | 57 #include "content/browser/renderer_host/input/web_input_event_builders_android.h
" |
| 58 #include "content/browser/renderer_host/render_process_host_impl.h" | 58 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 59 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 59 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
| 60 #include "content/browser/renderer_host/render_view_host_impl.h" | 60 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 61 #include "content/browser/renderer_host/render_widget_host_impl.h" | 61 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 62 #include "content/browser/renderer_host/render_widget_host_input_event_router.h" | 62 #include "content/browser/renderer_host/render_widget_host_input_event_router.h" |
| 63 #include "content/browser/renderer_host/ui_events_helper.h" |
| 63 #include "content/common/gpu_stream_constants.h" | 64 #include "content/common/gpu_stream_constants.h" |
| 64 #include "content/common/input_messages.h" | 65 #include "content/common/input_messages.h" |
| 65 #include "content/common/site_isolation_policy.h" | 66 #include "content/common/site_isolation_policy.h" |
| 66 #include "content/common/view_messages.h" | 67 #include "content/common/view_messages.h" |
| 67 #include "content/public/browser/android/compositor.h" | 68 #include "content/public/browser/android/compositor.h" |
| 68 #include "content/public/browser/android/synchronous_compositor_client.h" | 69 #include "content/public/browser/android/synchronous_compositor_client.h" |
| 69 #include "content/public/browser/browser_thread.h" | 70 #include "content/public/browser/browser_thread.h" |
| 70 #include "content/public/browser/devtools_agent_host.h" | 71 #include "content/public/browser/devtools_agent_host.h" |
| 71 #include "content/public/browser/render_view_host.h" | 72 #include "content/public/browser/render_view_host.h" |
| 72 #include "content/public/browser/render_widget_host_iterator.h" | 73 #include "content/public/browser/render_widget_host_iterator.h" |
| (...skipping 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1666 | 1667 |
| 1667 // TODO(jrg): Find out the implications and answer correctly here, | 1668 // TODO(jrg): Find out the implications and answer correctly here, |
| 1668 // as we are returning the WebView and not root window bounds. | 1669 // as we are returning the WebView and not root window bounds. |
| 1669 gfx::Rect RenderWidgetHostViewAndroid::GetBoundsInRootWindow() { | 1670 gfx::Rect RenderWidgetHostViewAndroid::GetBoundsInRootWindow() { |
| 1670 return GetViewBounds(); | 1671 return GetViewBounds(); |
| 1671 } | 1672 } |
| 1672 | 1673 |
| 1673 void RenderWidgetHostViewAndroid::ProcessAckedTouchEvent( | 1674 void RenderWidgetHostViewAndroid::ProcessAckedTouchEvent( |
| 1674 const TouchEventWithLatencyInfo& touch, InputEventAckState ack_result) { | 1675 const TouchEventWithLatencyInfo& touch, InputEventAckState ack_result) { |
| 1675 const bool event_consumed = ack_result == INPUT_EVENT_ACK_STATE_CONSUMED; | 1676 const bool event_consumed = ack_result == INPUT_EVENT_ACK_STATE_CONSUMED; |
| 1676 gesture_provider_.OnTouchEventAck(touch.event.unique_touch_event_id, | 1677 gesture_provider_.OnTouchEventAck( |
| 1677 event_consumed); | 1678 touch.event.unique_touch_event_id, event_consumed, |
| 1679 InputEventAckStateIsSetNonBlocking(ack_result)); |
| 1678 } | 1680 } |
| 1679 | 1681 |
| 1680 void RenderWidgetHostViewAndroid::GestureEventAck( | 1682 void RenderWidgetHostViewAndroid::GestureEventAck( |
| 1681 const blink::WebGestureEvent& event, | 1683 const blink::WebGestureEvent& event, |
| 1682 InputEventAckState ack_result) { | 1684 InputEventAckState ack_result) { |
| 1683 if (overscroll_controller_) | 1685 if (overscroll_controller_) |
| 1684 overscroll_controller_->OnGestureEventAck(event, ack_result); | 1686 overscroll_controller_->OnGestureEventAck(event, ack_result); |
| 1685 | 1687 |
| 1686 if (content_view_core_) | 1688 if (content_view_core_) |
| 1687 content_view_core_->OnGestureEventAck(event, ack_result); | 1689 content_view_core_->OnGestureEventAck(event, ack_result); |
| (...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2250 | 2252 |
| 2251 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); | 2253 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); |
| 2252 if (!compositor) | 2254 if (!compositor) |
| 2253 return; | 2255 return; |
| 2254 | 2256 |
| 2255 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( | 2257 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( |
| 2256 overscroll_refresh_handler, compositor, view_.GetDipScale()); | 2258 overscroll_refresh_handler, compositor, view_.GetDipScale()); |
| 2257 } | 2259 } |
| 2258 | 2260 |
| 2259 } // namespace content | 2261 } // namespace content |
| OLD | NEW |