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 16 matching lines...) Expand all Loading... | |
27 #include "base/threading/worker_pool.h" | 27 #include "base/threading/worker_pool.h" |
28 #include "cc/layers/layer.h" | 28 #include "cc/layers/layer.h" |
29 #include "cc/layers/surface_layer.h" | 29 #include "cc/layers/surface_layer.h" |
30 #include "cc/output/compositor_frame.h" | 30 #include "cc/output/compositor_frame.h" |
31 #include "cc/output/copy_output_request.h" | 31 #include "cc/output/copy_output_request.h" |
32 #include "cc/output/copy_output_result.h" | 32 #include "cc/output/copy_output_result.h" |
33 #include "cc/output/latency_info_swap_promise.h" | 33 #include "cc/output/latency_info_swap_promise.h" |
34 #include "cc/resources/single_release_callback.h" | 34 #include "cc/resources/single_release_callback.h" |
35 #include "cc/surfaces/surface.h" | 35 #include "cc/surfaces/surface.h" |
36 #include "cc/surfaces/surface_factory.h" | 36 #include "cc/surfaces/surface_factory.h" |
37 #include "cc/surfaces/surface_hittest.h" | |
37 #include "cc/surfaces/surface_manager.h" | 38 #include "cc/surfaces/surface_manager.h" |
38 #include "cc/trees/layer_tree_host.h" | 39 #include "cc/trees/layer_tree_host.h" |
39 #include "components/display_compositor/gl_helper.h" | 40 #include "components/display_compositor/gl_helper.h" |
40 #include "content/browser/accessibility/browser_accessibility_manager_android.h" | 41 #include "content/browser/accessibility/browser_accessibility_manager_android.h" |
41 #include "content/browser/android/composited_touch_handle_drawable.h" | 42 #include "content/browser/android/composited_touch_handle_drawable.h" |
42 #include "content/browser/android/content_view_core_impl.h" | 43 #include "content/browser/android/content_view_core_impl.h" |
43 #include "content/browser/android/overscroll_controller_android.h" | 44 #include "content/browser/android/overscroll_controller_android.h" |
44 #include "content/browser/android/synchronous_compositor_host.h" | 45 #include "content/browser/android/synchronous_compositor_host.h" |
46 #include "content/browser/compositor/surface_utils.h" | |
45 #include "content/browser/devtools/render_frame_devtools_agent_host.h" | 47 #include "content/browser/devtools/render_frame_devtools_agent_host.h" |
46 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" | 48 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" |
47 #include "content/browser/gpu/compositor_util.h" | 49 #include "content/browser/gpu/compositor_util.h" |
48 #include "content/browser/gpu/gpu_data_manager_impl.h" | 50 #include "content/browser/gpu/gpu_data_manager_impl.h" |
49 #include "content/browser/gpu/gpu_process_host_ui_shim.h" | 51 #include "content/browser/gpu/gpu_process_host_ui_shim.h" |
50 #include "content/browser/media/android/media_web_contents_observer_android.h" | 52 #include "content/browser/media/android/media_web_contents_observer_android.h" |
51 #include "content/browser/renderer_host/compositor_impl_android.h" | 53 #include "content/browser/renderer_host/compositor_impl_android.h" |
52 #include "content/browser/renderer_host/dip_util.h" | 54 #include "content/browser/renderer_host/dip_util.h" |
53 #include "content/browser/renderer_host/frame_metadata_util.h" | 55 #include "content/browser/renderer_host/frame_metadata_util.h" |
54 #include "content/browser/renderer_host/input/input_router_impl.h" | 56 #include "content/browser/renderer_host/input/input_router_impl.h" |
55 #include "content/browser/renderer_host/input/synthetic_gesture_target_android.h " | 57 #include "content/browser/renderer_host/input/synthetic_gesture_target_android.h " |
56 #include "content/browser/renderer_host/input/web_input_event_builders_android.h " | 58 #include "content/browser/renderer_host/input/web_input_event_builders_android.h " |
57 #include "content/browser/renderer_host/render_process_host_impl.h" | 59 #include "content/browser/renderer_host/render_process_host_impl.h" |
58 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 60 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
59 #include "content/browser/renderer_host/render_view_host_impl.h" | 61 #include "content/browser/renderer_host/render_view_host_impl.h" |
60 #include "content/browser/renderer_host/render_widget_host_impl.h" | 62 #include "content/browser/renderer_host/render_widget_host_impl.h" |
63 #include "content/browser/renderer_host/render_widget_host_input_event_router.h" | |
61 #include "content/common/gpu_host_messages.h" | 64 #include "content/common/gpu_host_messages.h" |
62 #include "content/common/input_messages.h" | 65 #include "content/common/input_messages.h" |
66 #include "content/common/site_isolation_policy.h" | |
63 #include "content/common/view_messages.h" | 67 #include "content/common/view_messages.h" |
64 #include "content/public/browser/android/compositor.h" | 68 #include "content/public/browser/android/compositor.h" |
65 #include "content/public/browser/android/synchronous_compositor_client.h" | 69 #include "content/public/browser/android/synchronous_compositor_client.h" |
66 #include "content/public/browser/browser_thread.h" | 70 #include "content/public/browser/browser_thread.h" |
67 #include "content/public/browser/devtools_agent_host.h" | 71 #include "content/public/browser/devtools_agent_host.h" |
68 #include "content/public/browser/render_view_host.h" | 72 #include "content/public/browser/render_view_host.h" |
69 #include "content/public/browser/render_widget_host_iterator.h" | 73 #include "content/public/browser/render_widget_host_iterator.h" |
70 #include "content/public/common/content_switches.h" | 74 #include "content/public/common/content_switches.h" |
71 #include "gpu/command_buffer/client/gles2_implementation.h" | 75 #include "gpu/command_buffer/client/gles2_implementation.h" |
72 #include "gpu/command_buffer/client/gles2_interface.h" | 76 #include "gpu/command_buffer/client/gles2_interface.h" |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
451 new ui::DelegatedFrameHostAndroid(&view_, this, frame_sink_id)); | 455 new ui::DelegatedFrameHostAndroid(&view_, this, frame_sink_id)); |
452 } | 456 } |
453 | 457 |
454 host_->SetView(this); | 458 host_->SetView(this); |
455 SetContentViewCore(content_view_core); | 459 SetContentViewCore(content_view_core); |
456 | 460 |
457 CreateOverscrollControllerIfPossible(); | 461 CreateOverscrollControllerIfPossible(); |
458 | 462 |
459 if (GetTextInputManager()) | 463 if (GetTextInputManager()) |
460 GetTextInputManager()->AddObserver(this); | 464 GetTextInputManager()->AddObserver(this); |
465 | |
466 // Let the page-level input event router know about our frame sink ID | |
467 // for surface-based hit testing. | |
468 if (host_->delegate() && host_->delegate()->GetInputEventRouter() && | |
469 SiteIsolationPolicy::AreCrossProcessFramesPossible()) { | |
alexmos
2017/03/06 07:22:03
Is the AreCrossProcessFramesPossible necessary her
kenrb
2017/03/07 19:20:19
Done.
| |
470 host_->delegate()->GetInputEventRouter()->AddFrameSinkIdOwner( | |
471 GetFrameSinkId(), this); | |
472 } | |
461 } | 473 } |
462 | 474 |
463 RenderWidgetHostViewAndroid::~RenderWidgetHostViewAndroid() { | 475 RenderWidgetHostViewAndroid::~RenderWidgetHostViewAndroid() { |
464 if (content_view_core_) | 476 if (content_view_core_) |
465 content_view_core_->RemoveObserver(this); | 477 content_view_core_->RemoveObserver(this); |
466 SetContentViewCore(NULL); | 478 SetContentViewCore(NULL); |
467 DCHECK(ack_callbacks_.empty()); | 479 DCHECK(ack_callbacks_.empty()); |
468 DCHECK(!delegated_frame_host_); | 480 DCHECK(!delegated_frame_host_); |
469 } | 481 } |
470 | 482 |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
789 | 801 |
790 void RenderWidgetHostViewAndroid::SetNeedsBeginFrames(bool needs_begin_frames) { | 802 void RenderWidgetHostViewAndroid::SetNeedsBeginFrames(bool needs_begin_frames) { |
791 TRACE_EVENT1("cc", "RenderWidgetHostViewAndroid::SetNeedsBeginFrames", | 803 TRACE_EVENT1("cc", "RenderWidgetHostViewAndroid::SetNeedsBeginFrames", |
792 "needs_begin_frames", needs_begin_frames); | 804 "needs_begin_frames", needs_begin_frames); |
793 if (needs_begin_frames) | 805 if (needs_begin_frames) |
794 AddBeginFrameRequest(PERSISTENT_BEGIN_FRAME); | 806 AddBeginFrameRequest(PERSISTENT_BEGIN_FRAME); |
795 else | 807 else |
796 ClearBeginFrameRequest(PERSISTENT_BEGIN_FRAME); | 808 ClearBeginFrameRequest(PERSISTENT_BEGIN_FRAME); |
797 } | 809 } |
798 | 810 |
811 cc::SurfaceId RenderWidgetHostViewAndroid::SurfaceIdForTesting() const { | |
812 return delegated_frame_host_->SurfaceId(); | |
alexmos
2017/03/06 07:22:03
Does this need to worry about delegated_frame_host
kenrb
2017/03/07 19:20:19
Good point. I have added guards to account for tha
| |
813 } | |
814 | |
815 cc::FrameSinkId RenderWidgetHostViewAndroid::FrameSinkIdAtPoint( | |
816 cc::SurfaceHittestDelegate* delegate, | |
817 const gfx::Point& point, | |
818 gfx::Point* transformed_point) { | |
819 float scale_factor = | |
820 display::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor(); | |
821 DCHECK_GT(scale_factor, 0); | |
822 // The surface hittest happens in device pixels, so we need to convert the | |
823 // |point| from DIPs to pixels before hittesting. | |
aelias_OOO_until_Jul13
2017/03/03 03:27:37
Input events originate in device pixels, so this i
kenrb
2017/03/03 18:38:44
This sounds like a good suggestion, but would real
| |
824 gfx::Point point_in_pixels = gfx::ConvertPointToPixel(scale_factor, point); | |
825 | |
826 cc::SurfaceId surface_id = delegated_frame_host_->SurfaceId(); | |
827 if (surface_id.is_valid()) { | |
828 cc::SurfaceHittest hittest(delegate, GetSurfaceManager()); | |
829 gfx::Transform target_transform; | |
830 surface_id = hittest.GetTargetSurfaceAtPoint(surface_id, point_in_pixels, | |
831 &target_transform); | |
832 *transformed_point = point_in_pixels; | |
833 if (surface_id.is_valid()) | |
834 target_transform.TransformPoint(transformed_point); | |
835 *transformed_point = | |
836 gfx::ConvertPointToDIP(scale_factor, *transformed_point); | |
837 } | |
838 | |
839 // It is possible that the renderer has not yet produced a surface, in which | |
840 // case we return our current namespace. | |
841 if (!surface_id.is_valid()) | |
842 return GetFrameSinkId(); | |
alexmos
2017/03/06 07:22:03
nit: you could move this if and return up before t
kenrb
2017/03/07 19:20:19
Having it here guards against the case of it becom
alexmos
2017/03/08 19:50:03
Acknowledged.
| |
843 return surface_id.frame_sink_id(); | |
844 } | |
845 | |
846 void RenderWidgetHostViewAndroid::ProcessMouseEvent( | |
847 const blink::WebMouseEvent& event, | |
848 const ui::LatencyInfo& latency) { | |
849 host_->ForwardMouseEventWithLatencyInfo(event, latency); | |
850 } | |
851 | |
852 void RenderWidgetHostViewAndroid::ProcessMouseWheelEvent( | |
853 const blink::WebMouseWheelEvent& event, | |
854 const ui::LatencyInfo& latency) { | |
855 host_->ForwardWheelEventWithLatencyInfo(event, latency); | |
856 } | |
857 | |
858 void RenderWidgetHostViewAndroid::ProcessTouchEvent( | |
859 const blink::WebTouchEvent& event, | |
860 const ui::LatencyInfo& latency) { | |
861 host_->ForwardTouchEventWithLatencyInfo(event, latency); | |
862 } | |
863 | |
864 void RenderWidgetHostViewAndroid::ProcessGestureEvent( | |
865 const blink::WebGestureEvent& event, | |
866 const ui::LatencyInfo& latency) { | |
867 host_->ForwardGestureEventWithLatencyInfo(event, latency); | |
868 } | |
869 | |
870 bool RenderWidgetHostViewAndroid::TransformPointToLocalCoordSpace( | |
871 const gfx::Point& point, | |
872 const cc::SurfaceId& original_surface, | |
873 gfx::Point* transformed_point) { | |
874 float scale_factor = | |
875 display::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor(); | |
876 DCHECK_GT(scale_factor, 0); | |
877 // Transformations use physical pixels rather than DIP, so conversion | |
878 // is necessary. | |
879 gfx::Point point_in_pixels = gfx::ConvertPointToPixel(scale_factor, point); | |
880 | |
881 cc::SurfaceId surface_id = delegated_frame_host_->SurfaceId(); | |
882 if (!surface_id.is_valid()) | |
883 return false; | |
884 | |
885 if (original_surface == surface_id) | |
886 return true; | |
887 | |
888 *transformed_point = point_in_pixels; | |
889 cc::SurfaceHittest hittest(nullptr, GetSurfaceManager()); | |
890 if (!hittest.TransformPointToTargetSurface(original_surface, surface_id, | |
891 transformed_point)) | |
892 return false; | |
893 | |
894 *transformed_point = gfx::ConvertPointToDIP(scale_factor, *transformed_point); | |
895 return true; | |
896 } | |
897 | |
898 bool RenderWidgetHostViewAndroid::TransformPointToCoordSpaceForView( | |
899 const gfx::Point& point, | |
900 RenderWidgetHostViewBase* target_view, | |
901 gfx::Point* transformed_point) { | |
alexmos
2017/03/06 07:22:03
In the equivalent RenderWidgetHostViewAura functio
kenrb
2017/03/07 19:20:19
Oh yeah, that should be here. I think I added that
alexmos
2017/03/08 19:50:03
Do you still need to add it? I don't see it in th
kenrb
2017/03/08 21:15:28
That's weird, but thanks for catching it. I am sur
| |
902 // In TransformPointToLocalCoordSpace() there is a Point-to-Pixel conversion, | |
903 // but it is not necessary here because the final target view is responsible | |
904 // for converting before computing the final transform. | |
905 cc::SurfaceId surface_id = delegated_frame_host_->SurfaceId(); | |
906 if (!surface_id.is_valid()) | |
907 return false; | |
908 | |
909 return target_view->TransformPointToLocalCoordSpace(point, surface_id, | |
910 transformed_point); | |
911 } | |
912 | |
799 void RenderWidgetHostViewAndroid::OnStartContentIntent( | 913 void RenderWidgetHostViewAndroid::OnStartContentIntent( |
800 const GURL& content_url, bool is_main_frame) { | 914 const GURL& content_url, bool is_main_frame) { |
801 view_.StartContentIntent(content_url, is_main_frame); | 915 view_.StartContentIntent(content_url, is_main_frame); |
802 } | 916 } |
803 | 917 |
804 bool RenderWidgetHostViewAndroid::OnTouchEvent( | 918 bool RenderWidgetHostViewAndroid::OnTouchEvent( |
805 const ui::MotionEvent& event) { | 919 const ui::MotionEvent& event) { |
806 if (!host_) | 920 if (!host_ || !host_->delegate()) |
807 return false; | 921 return false; |
808 | 922 |
809 ComputeEventLatencyOSTouchHistograms(event); | 923 ComputeEventLatencyOSTouchHistograms(event); |
810 | 924 |
811 // If a browser-based widget consumes the touch event, it's critical that | 925 // If a browser-based widget consumes the touch event, it's critical that |
812 // touch event interception be disabled. This avoids issues with | 926 // touch event interception be disabled. This avoids issues with |
813 // double-handling for embedder-detected gestures like side swipe. | 927 // double-handling for embedder-detected gestures like side swipe. |
814 if (selection_controller_ && | 928 if (selection_controller_ && |
815 selection_controller_->WillHandleTouchEvent(event)) { | 929 selection_controller_->WillHandleTouchEvent(event)) { |
816 RequestDisallowInterceptTouchEvent(); | 930 RequestDisallowInterceptTouchEvent(); |
817 return true; | 931 return true; |
818 } | 932 } |
819 | 933 |
820 if (stylus_text_selector_.OnTouchEvent(event)) { | 934 if (stylus_text_selector_.OnTouchEvent(event)) { |
821 RequestDisallowInterceptTouchEvent(); | 935 RequestDisallowInterceptTouchEvent(); |
822 return true; | 936 return true; |
823 } | 937 } |
824 | 938 |
825 ui::FilteredGestureProvider::TouchHandlingResult result = | 939 ui::FilteredGestureProvider::TouchHandlingResult result = |
826 gesture_provider_.OnTouchEvent(event); | 940 gesture_provider_.OnTouchEvent(event); |
827 if (!result.succeeded) | 941 if (!result.succeeded) |
828 return false; | 942 return false; |
829 | 943 |
830 blink::WebTouchEvent web_event = ui::CreateWebTouchEventFromMotionEvent( | 944 blink::WebTouchEvent web_event = ui::CreateWebTouchEventFromMotionEvent( |
831 event, result.moved_beyond_slop_region); | 945 event, result.moved_beyond_slop_region); |
832 ui::LatencyInfo latency_info(ui::SourceEventType::TOUCH); | 946 ui::LatencyInfo latency_info(ui::SourceEventType::TOUCH); |
833 latency_info.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_UI_COMPONENT, 0, 0); | 947 latency_info.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_UI_COMPONENT, 0, 0); |
834 host_->ForwardTouchEventWithLatencyInfo(web_event, latency_info); | 948 if (host_->delegate()->GetInputEventRouter() && |
949 SiteIsolationPolicy::AreCrossProcessFramesPossible()) { | |
alexmos
2017/03/06 07:22:03
There's a comment on RenderWidgetHostViewEventHand
kenrb
2017/03/07 19:20:19
I don't think that is strictly necessary because t
alexmos
2017/03/08 19:50:03
Ah, I see. I think it's ok to keep this for now t
| |
950 host_->delegate()->GetInputEventRouter()->RouteTouchEvent(this, &web_event, | |
951 latency_info); | |
952 } else { | |
953 host_->ForwardTouchEventWithLatencyInfo(web_event, latency_info); | |
954 } | |
835 | 955 |
836 // Send a proactive BeginFrame for this vsync to reduce scroll latency for | 956 // Send a proactive BeginFrame for this vsync to reduce scroll latency for |
837 // scroll-inducing touch events. Note that Android's Choreographer ensures | 957 // scroll-inducing touch events. Note that Android's Choreographer ensures |
838 // that BeginFrame requests made during ACTION_MOVE dispatch will be honored | 958 // that BeginFrame requests made during ACTION_MOVE dispatch will be honored |
839 // in the same vsync phase. | 959 // in the same vsync phase. |
840 if (observing_root_window_ && result.moved_beyond_slop_region) | 960 if (observing_root_window_ && result.moved_beyond_slop_region) |
841 AddBeginFrameRequest(BEGIN_FRAME); | 961 AddBeginFrameRequest(BEGIN_FRAME); |
842 | 962 |
843 return true; | 963 return true; |
844 } | 964 } |
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1620 motion_event.GetY(0), | 1740 motion_event.GetY(0), |
1621 motion_event.GetFlags(), | 1741 motion_event.GetFlags(), |
1622 motion_event.GetButtonState() ? 1 : 0 /* click count */, | 1742 motion_event.GetButtonState() ? 1 : 0 /* click count */, |
1623 motion_event.GetPointerId(0), | 1743 motion_event.GetPointerId(0), |
1624 motion_event.GetPressure(0), | 1744 motion_event.GetPressure(0), |
1625 motion_event.GetOrientation(0), | 1745 motion_event.GetOrientation(0), |
1626 motion_event.GetTilt(0), | 1746 motion_event.GetTilt(0), |
1627 action_button, | 1747 action_button, |
1628 motion_event.GetToolType(0)); | 1748 motion_event.GetToolType(0)); |
1629 | 1749 |
1630 if (host_) | 1750 if (!host_ || !host_->delegate()) |
1751 return; | |
1752 | |
1753 if (SiteIsolationPolicy::AreCrossProcessFramesPossible() && | |
1754 host_->delegate()->GetInputEventRouter()) { | |
1755 host_->delegate()->GetInputEventRouter()->RouteMouseEvent( | |
1756 this, &mouse_event, ui::LatencyInfo()); | |
1757 } else { | |
1631 host_->ForwardMouseEvent(mouse_event); | 1758 host_->ForwardMouseEvent(mouse_event); |
1759 } | |
1632 } | 1760 } |
1633 | 1761 |
1634 void RenderWidgetHostViewAndroid::SendMouseWheelEvent( | 1762 void RenderWidgetHostViewAndroid::SendMouseWheelEvent( |
1635 const blink::WebMouseWheelEvent& event) { | 1763 const blink::WebMouseWheelEvent& event) { |
1636 if (host_) { | 1764 if (!host_ || !host_->delegate()) |
1637 ui::LatencyInfo latency_info(ui::SourceEventType::WHEEL); | 1765 return; |
1638 latency_info.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_UI_COMPONENT, 0, 0); | 1766 |
1767 ui::LatencyInfo latency_info(ui::SourceEventType::WHEEL); | |
1768 latency_info.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_UI_COMPONENT, 0, 0); | |
1769 if (SiteIsolationPolicy::AreCrossProcessFramesPossible() && | |
1770 host_->delegate()->GetInputEventRouter()) { | |
1771 blink::WebMouseWheelEvent wheel_event(event); | |
1772 host_->delegate()->GetInputEventRouter()->RouteMouseWheelEvent( | |
1773 this, &wheel_event, latency_info); | |
1774 } else { | |
1639 host_->ForwardWheelEventWithLatencyInfo(event, latency_info); | 1775 host_->ForwardWheelEventWithLatencyInfo(event, latency_info); |
1640 } | 1776 } |
1641 } | 1777 } |
1642 | 1778 |
1643 void RenderWidgetHostViewAndroid::SendGestureEvent( | 1779 void RenderWidgetHostViewAndroid::SendGestureEvent( |
1644 const blink::WebGestureEvent& event) { | 1780 const blink::WebGestureEvent& event) { |
1645 // Sending a gesture that may trigger overscroll should resume the effect. | 1781 // Sending a gesture that may trigger overscroll should resume the effect. |
1646 if (overscroll_controller_) | 1782 if (overscroll_controller_) |
1647 overscroll_controller_->Enable(); | 1783 overscroll_controller_->Enable(); |
1648 | 1784 |
1649 if (host_) { | 1785 if (!host_ || !host_->delegate()) |
1650 ui::LatencyInfo latency_info = | 1786 return; |
1651 ui::WebInputEventTraits::CreateLatencyInfoForWebGestureEvent(event); | 1787 |
1788 ui::LatencyInfo latency_info = | |
1789 ui::WebInputEventTraits::CreateLatencyInfoForWebGestureEvent(event); | |
1790 if (SiteIsolationPolicy::AreCrossProcessFramesPossible() && | |
1791 host_->delegate()->GetInputEventRouter()) { | |
1792 blink::WebGestureEvent gesture_event(event); | |
1793 host_->delegate()->GetInputEventRouter()->RouteGestureEvent( | |
1794 this, &gesture_event, latency_info); | |
1795 } else { | |
1652 host_->ForwardGestureEventWithLatencyInfo(event, latency_info); | 1796 host_->ForwardGestureEventWithLatencyInfo(event, latency_info); |
1653 } | 1797 } |
1654 } | 1798 } |
1655 | 1799 |
1656 void RenderWidgetHostViewAndroid::MoveCaret(const gfx::Point& point) { | 1800 void RenderWidgetHostViewAndroid::MoveCaret(const gfx::Point& point) { |
1657 if (host_) | 1801 if (host_) |
1658 host_->MoveCaret(point); | 1802 host_->MoveCaret(point); |
1659 } | 1803 } |
1660 | 1804 |
1661 void RenderWidgetHostViewAndroid::DismissTextHandles() { | 1805 void RenderWidgetHostViewAndroid::DismissTextHandles() { |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1986 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); | 2130 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); |
1987 if (!compositor) | 2131 if (!compositor) |
1988 return; | 2132 return; |
1989 | 2133 |
1990 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( | 2134 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( |
1991 overscroll_refresh_handler, compositor, | 2135 overscroll_refresh_handler, compositor, |
1992 ui::GetScaleFactorForNativeView(GetNativeView())); | 2136 ui::GetScaleFactorForNativeView(GetNativeView())); |
1993 } | 2137 } |
1994 | 2138 |
1995 } // namespace content | 2139 } // namespace content |
OLD | NEW |