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.h" | 51 #include "content/browser/gpu/gpu_process_host.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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 prev_bottom_shown_pix_(0.f), | 454 prev_bottom_shown_pix_(0.f), |
451 weak_ptr_factory_(this) { | 455 weak_ptr_factory_(this) { |
452 // Set the layer which will hold the content layer for this view. The content | 456 // Set the layer which will hold the content layer for this view. The content |
453 // layer is managed by the DelegatedFrameHost. | 457 // layer is managed by the DelegatedFrameHost. |
454 view_.SetLayer(cc::Layer::Create()); | 458 view_.SetLayer(cc::Layer::Create()); |
455 if (using_browser_compositor_) { | 459 if (using_browser_compositor_) { |
456 cc::FrameSinkId frame_sink_id = | 460 cc::FrameSinkId frame_sink_id = |
457 host_->AllocateFrameSinkId(false /* is_guest_view_hack */); | 461 host_->AllocateFrameSinkId(false /* is_guest_view_hack */); |
458 delegated_frame_host_.reset(new ui::DelegatedFrameHostAndroid( | 462 delegated_frame_host_.reset(new ui::DelegatedFrameHostAndroid( |
459 &view_, CompositorImpl::GetSurfaceManager(), this, frame_sink_id)); | 463 &view_, CompositorImpl::GetSurfaceManager(), this, frame_sink_id)); |
| 464 |
| 465 // Let the page-level input event router know about our frame sink ID |
| 466 // for surface-based hit testing. |
| 467 if (host_->delegate() && host_->delegate()->GetInputEventRouter()) { |
| 468 host_->delegate()->GetInputEventRouter()->AddFrameSinkIdOwner( |
| 469 GetFrameSinkId(), this); |
| 470 } |
460 } | 471 } |
461 | 472 |
462 host_->SetView(this); | 473 host_->SetView(this); |
463 SetContentViewCore(content_view_core); | 474 SetContentViewCore(content_view_core); |
464 | 475 |
465 CreateOverscrollControllerIfPossible(); | 476 CreateOverscrollControllerIfPossible(); |
466 | 477 |
467 if (GetTextInputManager()) | 478 if (GetTextInputManager()) |
468 GetTextInputManager()->AddObserver(this); | 479 GetTextInputManager()->AddObserver(this); |
469 } | 480 } |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
791 | 802 |
792 void RenderWidgetHostViewAndroid::SetNeedsBeginFrames(bool needs_begin_frames) { | 803 void RenderWidgetHostViewAndroid::SetNeedsBeginFrames(bool needs_begin_frames) { |
793 TRACE_EVENT1("cc", "RenderWidgetHostViewAndroid::SetNeedsBeginFrames", | 804 TRACE_EVENT1("cc", "RenderWidgetHostViewAndroid::SetNeedsBeginFrames", |
794 "needs_begin_frames", needs_begin_frames); | 805 "needs_begin_frames", needs_begin_frames); |
795 if (needs_begin_frames) | 806 if (needs_begin_frames) |
796 AddBeginFrameRequest(PERSISTENT_BEGIN_FRAME); | 807 AddBeginFrameRequest(PERSISTENT_BEGIN_FRAME); |
797 else | 808 else |
798 ClearBeginFrameRequest(PERSISTENT_BEGIN_FRAME); | 809 ClearBeginFrameRequest(PERSISTENT_BEGIN_FRAME); |
799 } | 810 } |
800 | 811 |
| 812 cc::SurfaceId RenderWidgetHostViewAndroid::SurfaceIdForTesting() const { |
| 813 return delegated_frame_host_ ? delegated_frame_host_->SurfaceId() |
| 814 : cc::SurfaceId(); |
| 815 } |
| 816 |
| 817 cc::FrameSinkId RenderWidgetHostViewAndroid::FrameSinkIdAtPoint( |
| 818 cc::SurfaceHittestDelegate* delegate, |
| 819 const gfx::Point& point, |
| 820 gfx::Point* transformed_point) { |
| 821 if (!delegated_frame_host_) |
| 822 return cc::FrameSinkId(); |
| 823 |
| 824 float scale_factor = |
| 825 display::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor(); |
| 826 DCHECK_GT(scale_factor, 0); |
| 827 // The surface hittest happens in device pixels, so we need to convert the |
| 828 // |point| from DIPs to pixels before hittesting. |
| 829 gfx::Point point_in_pixels = gfx::ConvertPointToPixel(scale_factor, point); |
| 830 |
| 831 cc::SurfaceId surface_id = delegated_frame_host_->SurfaceId(); |
| 832 if (surface_id.is_valid()) { |
| 833 cc::SurfaceHittest hittest(delegate, GetSurfaceManager()); |
| 834 gfx::Transform target_transform; |
| 835 surface_id = hittest.GetTargetSurfaceAtPoint(surface_id, point_in_pixels, |
| 836 &target_transform); |
| 837 *transformed_point = point_in_pixels; |
| 838 if (surface_id.is_valid()) |
| 839 target_transform.TransformPoint(transformed_point); |
| 840 *transformed_point = |
| 841 gfx::ConvertPointToDIP(scale_factor, *transformed_point); |
| 842 } |
| 843 |
| 844 // It is possible that the renderer has not yet produced a surface, in which |
| 845 // case we return our current namespace. |
| 846 if (!surface_id.is_valid()) |
| 847 return GetFrameSinkId(); |
| 848 return surface_id.frame_sink_id(); |
| 849 } |
| 850 |
| 851 void RenderWidgetHostViewAndroid::ProcessMouseEvent( |
| 852 const blink::WebMouseEvent& event, |
| 853 const ui::LatencyInfo& latency) { |
| 854 host_->ForwardMouseEventWithLatencyInfo(event, latency); |
| 855 } |
| 856 |
| 857 void RenderWidgetHostViewAndroid::ProcessMouseWheelEvent( |
| 858 const blink::WebMouseWheelEvent& event, |
| 859 const ui::LatencyInfo& latency) { |
| 860 host_->ForwardWheelEventWithLatencyInfo(event, latency); |
| 861 } |
| 862 |
| 863 void RenderWidgetHostViewAndroid::ProcessTouchEvent( |
| 864 const blink::WebTouchEvent& event, |
| 865 const ui::LatencyInfo& latency) { |
| 866 host_->ForwardTouchEventWithLatencyInfo(event, latency); |
| 867 } |
| 868 |
| 869 void RenderWidgetHostViewAndroid::ProcessGestureEvent( |
| 870 const blink::WebGestureEvent& event, |
| 871 const ui::LatencyInfo& latency) { |
| 872 host_->ForwardGestureEventWithLatencyInfo(event, latency); |
| 873 } |
| 874 |
| 875 bool RenderWidgetHostViewAndroid::TransformPointToLocalCoordSpace( |
| 876 const gfx::Point& point, |
| 877 const cc::SurfaceId& original_surface, |
| 878 gfx::Point* transformed_point) { |
| 879 if (!delegated_frame_host_) |
| 880 return false; |
| 881 |
| 882 float scale_factor = |
| 883 display::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor(); |
| 884 DCHECK_GT(scale_factor, 0); |
| 885 // Transformations use physical pixels rather than DIP, so conversion |
| 886 // is necessary. |
| 887 gfx::Point point_in_pixels = gfx::ConvertPointToPixel(scale_factor, point); |
| 888 |
| 889 cc::SurfaceId surface_id = delegated_frame_host_->SurfaceId(); |
| 890 if (!surface_id.is_valid()) |
| 891 return false; |
| 892 |
| 893 if (original_surface == surface_id) |
| 894 return true; |
| 895 |
| 896 *transformed_point = point_in_pixels; |
| 897 cc::SurfaceHittest hittest(nullptr, GetSurfaceManager()); |
| 898 if (!hittest.TransformPointToTargetSurface(original_surface, surface_id, |
| 899 transformed_point)) |
| 900 return false; |
| 901 |
| 902 *transformed_point = gfx::ConvertPointToDIP(scale_factor, *transformed_point); |
| 903 return true; |
| 904 } |
| 905 |
| 906 bool RenderWidgetHostViewAndroid::TransformPointToCoordSpaceForView( |
| 907 const gfx::Point& point, |
| 908 RenderWidgetHostViewBase* target_view, |
| 909 gfx::Point* transformed_point) { |
| 910 if (target_view == this || !delegated_frame_host_) { |
| 911 *transformed_point = point; |
| 912 return true; |
| 913 } |
| 914 |
| 915 // In TransformPointToLocalCoordSpace() there is a Point-to-Pixel conversion, |
| 916 // but it is not necessary here because the final target view is responsible |
| 917 // for converting before computing the final transform. |
| 918 cc::SurfaceId surface_id = delegated_frame_host_->SurfaceId(); |
| 919 if (!surface_id.is_valid()) |
| 920 return false; |
| 921 |
| 922 return target_view->TransformPointToLocalCoordSpace(point, surface_id, |
| 923 transformed_point); |
| 924 } |
| 925 |
801 void RenderWidgetHostViewAndroid::OnStartContentIntent( | 926 void RenderWidgetHostViewAndroid::OnStartContentIntent( |
802 const GURL& content_url, bool is_main_frame) { | 927 const GURL& content_url, bool is_main_frame) { |
803 view_.StartContentIntent(content_url, is_main_frame); | 928 view_.StartContentIntent(content_url, is_main_frame); |
804 } | 929 } |
805 | 930 |
806 bool RenderWidgetHostViewAndroid::OnTouchEvent( | 931 bool RenderWidgetHostViewAndroid::OnTouchEvent( |
807 const ui::MotionEvent& event) { | 932 const ui::MotionEvent& event) { |
808 if (!host_) | 933 if (!host_ || !host_->delegate()) |
809 return false; | 934 return false; |
810 | 935 |
811 ComputeEventLatencyOSTouchHistograms(event); | 936 ComputeEventLatencyOSTouchHistograms(event); |
812 | 937 |
813 // If a browser-based widget consumes the touch event, it's critical that | 938 // If a browser-based widget consumes the touch event, it's critical that |
814 // touch event interception be disabled. This avoids issues with | 939 // touch event interception be disabled. This avoids issues with |
815 // double-handling for embedder-detected gestures like side swipe. | 940 // double-handling for embedder-detected gestures like side swipe. |
816 if (selection_controller_ && | 941 if (selection_controller_ && |
817 selection_controller_->WillHandleTouchEvent(event)) { | 942 selection_controller_->WillHandleTouchEvent(event)) { |
818 RequestDisallowInterceptTouchEvent(); | 943 RequestDisallowInterceptTouchEvent(); |
819 return true; | 944 return true; |
820 } | 945 } |
821 | 946 |
822 if (stylus_text_selector_.OnTouchEvent(event)) { | 947 if (stylus_text_selector_.OnTouchEvent(event)) { |
823 RequestDisallowInterceptTouchEvent(); | 948 RequestDisallowInterceptTouchEvent(); |
824 return true; | 949 return true; |
825 } | 950 } |
826 | 951 |
827 ui::FilteredGestureProvider::TouchHandlingResult result = | 952 ui::FilteredGestureProvider::TouchHandlingResult result = |
828 gesture_provider_.OnTouchEvent(event); | 953 gesture_provider_.OnTouchEvent(event); |
829 if (!result.succeeded) | 954 if (!result.succeeded) |
830 return false; | 955 return false; |
831 | 956 |
832 blink::WebTouchEvent web_event = ui::CreateWebTouchEventFromMotionEvent( | 957 blink::WebTouchEvent web_event = ui::CreateWebTouchEventFromMotionEvent( |
833 event, result.moved_beyond_slop_region); | 958 event, result.moved_beyond_slop_region); |
834 ui::LatencyInfo latency_info(ui::SourceEventType::TOUCH); | 959 ui::LatencyInfo latency_info(ui::SourceEventType::TOUCH); |
835 latency_info.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_UI_COMPONENT, 0, 0); | 960 latency_info.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_UI_COMPONENT, 0, 0); |
836 host_->ForwardTouchEventWithLatencyInfo(web_event, latency_info); | 961 if (host_->delegate()->GetInputEventRouter() && |
| 962 SiteIsolationPolicy::AreCrossProcessFramesPossible()) { |
| 963 host_->delegate()->GetInputEventRouter()->RouteTouchEvent(this, &web_event, |
| 964 latency_info); |
| 965 } else { |
| 966 host_->ForwardTouchEventWithLatencyInfo(web_event, latency_info); |
| 967 } |
837 | 968 |
838 // Send a proactive BeginFrame for this vsync to reduce scroll latency for | 969 // Send a proactive BeginFrame for this vsync to reduce scroll latency for |
839 // scroll-inducing touch events. Note that Android's Choreographer ensures | 970 // scroll-inducing touch events. Note that Android's Choreographer ensures |
840 // that BeginFrame requests made during ACTION_MOVE dispatch will be honored | 971 // that BeginFrame requests made during ACTION_MOVE dispatch will be honored |
841 // in the same vsync phase. | 972 // in the same vsync phase. |
842 if (observing_root_window_ && result.moved_beyond_slop_region) | 973 if (observing_root_window_ && result.moved_beyond_slop_region) |
843 AddBeginFrameRequest(BEGIN_FRAME); | 974 AddBeginFrameRequest(BEGIN_FRAME); |
844 | 975 |
845 return true; | 976 return true; |
846 } | 977 } |
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1607 motion_event.GetY(0), | 1738 motion_event.GetY(0), |
1608 motion_event.GetFlags(), | 1739 motion_event.GetFlags(), |
1609 motion_event.GetButtonState() ? 1 : 0 /* click count */, | 1740 motion_event.GetButtonState() ? 1 : 0 /* click count */, |
1610 motion_event.GetPointerId(0), | 1741 motion_event.GetPointerId(0), |
1611 motion_event.GetPressure(0), | 1742 motion_event.GetPressure(0), |
1612 motion_event.GetOrientation(0), | 1743 motion_event.GetOrientation(0), |
1613 motion_event.GetTilt(0), | 1744 motion_event.GetTilt(0), |
1614 action_button, | 1745 action_button, |
1615 motion_event.GetToolType(0)); | 1746 motion_event.GetToolType(0)); |
1616 | 1747 |
1617 if (host_) | 1748 if (!host_ || !host_->delegate()) |
| 1749 return; |
| 1750 |
| 1751 if (SiteIsolationPolicy::AreCrossProcessFramesPossible() && |
| 1752 host_->delegate()->GetInputEventRouter()) { |
| 1753 host_->delegate()->GetInputEventRouter()->RouteMouseEvent( |
| 1754 this, &mouse_event, ui::LatencyInfo()); |
| 1755 } else { |
1618 host_->ForwardMouseEvent(mouse_event); | 1756 host_->ForwardMouseEvent(mouse_event); |
| 1757 } |
1619 } | 1758 } |
1620 | 1759 |
1621 void RenderWidgetHostViewAndroid::SendMouseWheelEvent( | 1760 void RenderWidgetHostViewAndroid::SendMouseWheelEvent( |
1622 const blink::WebMouseWheelEvent& event) { | 1761 const blink::WebMouseWheelEvent& event) { |
1623 if (host_) { | 1762 if (!host_ || !host_->delegate()) |
1624 ui::LatencyInfo latency_info(ui::SourceEventType::WHEEL); | 1763 return; |
1625 latency_info.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_UI_COMPONENT, 0, 0); | 1764 |
| 1765 ui::LatencyInfo latency_info(ui::SourceEventType::WHEEL); |
| 1766 latency_info.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_UI_COMPONENT, 0, 0); |
| 1767 if (SiteIsolationPolicy::AreCrossProcessFramesPossible() && |
| 1768 host_->delegate()->GetInputEventRouter()) { |
| 1769 blink::WebMouseWheelEvent wheel_event(event); |
| 1770 host_->delegate()->GetInputEventRouter()->RouteMouseWheelEvent( |
| 1771 this, &wheel_event, latency_info); |
| 1772 } else { |
1626 host_->ForwardWheelEventWithLatencyInfo(event, latency_info); | 1773 host_->ForwardWheelEventWithLatencyInfo(event, latency_info); |
1627 } | 1774 } |
1628 } | 1775 } |
1629 | 1776 |
1630 void RenderWidgetHostViewAndroid::SendGestureEvent( | 1777 void RenderWidgetHostViewAndroid::SendGestureEvent( |
1631 const blink::WebGestureEvent& event) { | 1778 const blink::WebGestureEvent& event) { |
1632 // Sending a gesture that may trigger overscroll should resume the effect. | 1779 // Sending a gesture that may trigger overscroll should resume the effect. |
1633 if (overscroll_controller_) | 1780 if (overscroll_controller_) |
1634 overscroll_controller_->Enable(); | 1781 overscroll_controller_->Enable(); |
1635 | 1782 |
1636 if (host_) { | 1783 if (!host_ || !host_->delegate()) |
1637 ui::LatencyInfo latency_info = | 1784 return; |
1638 ui::WebInputEventTraits::CreateLatencyInfoForWebGestureEvent(event); | 1785 |
| 1786 ui::LatencyInfo latency_info = |
| 1787 ui::WebInputEventTraits::CreateLatencyInfoForWebGestureEvent(event); |
| 1788 if (SiteIsolationPolicy::AreCrossProcessFramesPossible() && |
| 1789 host_->delegate()->GetInputEventRouter()) { |
| 1790 blink::WebGestureEvent gesture_event(event); |
| 1791 host_->delegate()->GetInputEventRouter()->RouteGestureEvent( |
| 1792 this, &gesture_event, latency_info); |
| 1793 } else { |
1639 host_->ForwardGestureEventWithLatencyInfo(event, latency_info); | 1794 host_->ForwardGestureEventWithLatencyInfo(event, latency_info); |
1640 } | 1795 } |
1641 } | 1796 } |
1642 | 1797 |
1643 void RenderWidgetHostViewAndroid::MoveCaret(const gfx::Point& point) { | 1798 void RenderWidgetHostViewAndroid::MoveCaret(const gfx::Point& point) { |
1644 if (host_) | 1799 if (host_) |
1645 host_->MoveCaret(point); | 1800 host_->MoveCaret(point); |
1646 } | 1801 } |
1647 | 1802 |
1648 void RenderWidgetHostViewAndroid::DismissTextHandles() { | 1803 void RenderWidgetHostViewAndroid::DismissTextHandles() { |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1973 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); | 2128 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); |
1974 if (!compositor) | 2129 if (!compositor) |
1975 return; | 2130 return; |
1976 | 2131 |
1977 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( | 2132 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( |
1978 overscroll_refresh_handler, compositor, | 2133 overscroll_refresh_handler, compositor, |
1979 ui::GetScaleFactorForNativeView(GetNativeView())); | 2134 ui::GetScaleFactorForNativeView(GetNativeView())); |
1980 } | 2135 } |
1981 | 2136 |
1982 } // namespace content | 2137 } // namespace content |
OLD | NEW |