| 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 1586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1659 | 1660 |
| 1660 // TODO(jrg): Find out the implications and answer correctly here, | 1661 // TODO(jrg): Find out the implications and answer correctly here, |
| 1661 // as we are returning the WebView and not root window bounds. | 1662 // as we are returning the WebView and not root window bounds. |
| 1662 gfx::Rect RenderWidgetHostViewAndroid::GetBoundsInRootWindow() { | 1663 gfx::Rect RenderWidgetHostViewAndroid::GetBoundsInRootWindow() { |
| 1663 return GetViewBounds(); | 1664 return GetViewBounds(); |
| 1664 } | 1665 } |
| 1665 | 1666 |
| 1666 void RenderWidgetHostViewAndroid::ProcessAckedTouchEvent( | 1667 void RenderWidgetHostViewAndroid::ProcessAckedTouchEvent( |
| 1667 const TouchEventWithLatencyInfo& touch, InputEventAckState ack_result) { | 1668 const TouchEventWithLatencyInfo& touch, InputEventAckState ack_result) { |
| 1668 const bool event_consumed = ack_result == INPUT_EVENT_ACK_STATE_CONSUMED; | 1669 const bool event_consumed = ack_result == INPUT_EVENT_ACK_STATE_CONSUMED; |
| 1669 gesture_provider_.OnTouchEventAck(touch.event.unique_touch_event_id, | 1670 gesture_provider_.OnTouchEventAck( |
| 1670 event_consumed); | 1671 touch.event.unique_touch_event_id, event_consumed, |
| 1672 InputEventAckStateIsSetNonBlocking(ack_result)); |
| 1671 } | 1673 } |
| 1672 | 1674 |
| 1673 void RenderWidgetHostViewAndroid::GestureEventAck( | 1675 void RenderWidgetHostViewAndroid::GestureEventAck( |
| 1674 const blink::WebGestureEvent& event, | 1676 const blink::WebGestureEvent& event, |
| 1675 InputEventAckState ack_result) { | 1677 InputEventAckState ack_result) { |
| 1676 if (overscroll_controller_) | 1678 if (overscroll_controller_) |
| 1677 overscroll_controller_->OnGestureEventAck(event, ack_result); | 1679 overscroll_controller_->OnGestureEventAck(event, ack_result); |
| 1678 | 1680 |
| 1679 if (content_view_core_) | 1681 if (content_view_core_) |
| 1680 content_view_core_->OnGestureEventAck(event, ack_result); | 1682 content_view_core_->OnGestureEventAck(event, ack_result); |
| (...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2238 | 2240 |
| 2239 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); | 2241 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); |
| 2240 if (!compositor) | 2242 if (!compositor) |
| 2241 return; | 2243 return; |
| 2242 | 2244 |
| 2243 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( | 2245 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( |
| 2244 overscroll_refresh_handler, compositor, view_.GetDipScale()); | 2246 overscroll_refresh_handler, compositor, view_.GetDipScale()); |
| 2245 } | 2247 } |
| 2246 | 2248 |
| 2247 } // namespace content | 2249 } // namespace content |
| OLD | NEW |