Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 2263043002: android_webview: Let AwContents manage TouchHandleDrawable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix build Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/browser/android/synchronous_compositor_host.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 20 matching lines...) Expand all
31 #include "cc/surfaces/surface.h" 31 #include "cc/surfaces/surface.h"
32 #include "cc/surfaces/surface_factory.h" 32 #include "cc/surfaces/surface_factory.h"
33 #include "cc/surfaces/surface_id_allocator.h" 33 #include "cc/surfaces/surface_id_allocator.h"
34 #include "cc/surfaces/surface_manager.h" 34 #include "cc/surfaces/surface_manager.h"
35 #include "cc/trees/layer_tree_host.h" 35 #include "cc/trees/layer_tree_host.h"
36 #include "components/display_compositor/gl_helper.h" 36 #include "components/display_compositor/gl_helper.h"
37 #include "content/browser/accessibility/browser_accessibility_manager_android.h" 37 #include "content/browser/accessibility/browser_accessibility_manager_android.h"
38 #include "content/browser/android/composited_touch_handle_drawable.h" 38 #include "content/browser/android/composited_touch_handle_drawable.h"
39 #include "content/browser/android/content_view_core_impl.h" 39 #include "content/browser/android/content_view_core_impl.h"
40 #include "content/browser/android/overscroll_controller_android.h" 40 #include "content/browser/android/overscroll_controller_android.h"
41 #include "content/browser/android/popup_touch_handle_drawable.h"
42 #include "content/browser/android/synchronous_compositor_host.h" 41 #include "content/browser/android/synchronous_compositor_host.h"
43 #include "content/browser/devtools/render_frame_devtools_agent_host.h" 42 #include "content/browser/devtools/render_frame_devtools_agent_host.h"
44 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" 43 #include "content/browser/gpu/browser_gpu_channel_host_factory.h"
45 #include "content/browser/gpu/compositor_util.h" 44 #include "content/browser/gpu/compositor_util.h"
46 #include "content/browser/gpu/gpu_data_manager_impl.h" 45 #include "content/browser/gpu/gpu_data_manager_impl.h"
47 #include "content/browser/gpu/gpu_process_host_ui_shim.h" 46 #include "content/browser/gpu/gpu_process_host_ui_shim.h"
48 #include "content/browser/media/android/media_web_contents_observer_android.h" 47 #include "content/browser/media/android/media_web_contents_observer_android.h"
49 #include "content/browser/renderer_host/compositor_impl_android.h" 48 #include "content/browser/renderer_host/compositor_impl_android.h"
50 #include "content/browser/renderer_host/dip_util.h" 49 #include "content/browser/renderer_host/dip_util.h"
51 #include "content/browser/renderer_host/frame_metadata_util.h" 50 #include "content/browser/renderer_host/frame_metadata_util.h"
52 #include "content/browser/renderer_host/input/synthetic_gesture_target_android.h " 51 #include "content/browser/renderer_host/input/synthetic_gesture_target_android.h "
53 #include "content/browser/renderer_host/input/web_input_event_builders_android.h " 52 #include "content/browser/renderer_host/input/web_input_event_builders_android.h "
54 #include "content/browser/renderer_host/render_process_host_impl.h" 53 #include "content/browser/renderer_host/render_process_host_impl.h"
55 #include "content/browser/renderer_host/render_view_host_impl.h" 54 #include "content/browser/renderer_host/render_view_host_impl.h"
56 #include "content/browser/renderer_host/render_widget_host_impl.h" 55 #include "content/browser/renderer_host/render_widget_host_impl.h"
57 #include "content/common/gpu_host_messages.h" 56 #include "content/common/gpu_host_messages.h"
58 #include "content/common/input_messages.h" 57 #include "content/common/input_messages.h"
59 #include "content/common/view_messages.h" 58 #include "content/common/view_messages.h"
60 #include "content/public/browser/android/compositor.h" 59 #include "content/public/browser/android/compositor.h"
60 #include "content/public/browser/android/synchronous_compositor_client.h"
61 #include "content/public/browser/browser_thread.h" 61 #include "content/public/browser/browser_thread.h"
62 #include "content/public/browser/devtools_agent_host.h" 62 #include "content/public/browser/devtools_agent_host.h"
63 #include "content/public/browser/render_view_host.h" 63 #include "content/public/browser/render_view_host.h"
64 #include "content/public/browser/render_widget_host_iterator.h" 64 #include "content/public/browser/render_widget_host_iterator.h"
65 #include "content/public/common/content_switches.h" 65 #include "content/public/common/content_switches.h"
66 #include "gpu/command_buffer/client/gles2_implementation.h" 66 #include "gpu/command_buffer/client/gles2_implementation.h"
67 #include "gpu/command_buffer/client/gles2_interface.h" 67 #include "gpu/command_buffer/client/gles2_interface.h"
68 #include "gpu/config/gpu_driver_bug_workaround_type.h" 68 #include "gpu/config/gpu_driver_bug_workaround_type.h"
69 #include "ipc/ipc_message_macros.h" 69 #include "ipc/ipc_message_macros.h"
70 #include "ipc/ipc_message_start.h" 70 #include "ipc/ipc_message_start.h"
(...skipping 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 ResetGestureDetection(); 1090 ResetGestureDetection();
1091 } 1091 }
1092 content_view_core_->OnSelectionEvent( 1092 content_view_core_->OnSelectionEvent(
1093 event, selection_controller_->GetStartPosition(), 1093 event, selection_controller_->GetStartPosition(),
1094 GetSelectionRect(*selection_controller_)); 1094 GetSelectionRect(*selection_controller_));
1095 } 1095 }
1096 1096
1097 std::unique_ptr<ui::TouchHandleDrawable> 1097 std::unique_ptr<ui::TouchHandleDrawable>
1098 RenderWidgetHostViewAndroid::CreateDrawable() { 1098 RenderWidgetHostViewAndroid::CreateDrawable() {
1099 DCHECK(content_view_core_); 1099 DCHECK(content_view_core_);
1100 if (!using_browser_compositor_) 1100 if (!using_browser_compositor_) {
1101 return PopupTouchHandleDrawable::Create( 1101 if (!sync_compositor_)
1102 content_view_core_, ui::GetScaleFactorForNativeView(GetNativeView())); 1102 return nullptr;
1103 1103 return std::unique_ptr<ui::TouchHandleDrawable>(
1104 sync_compositor_->client()->CreateDrawable());
1105 }
1104 return std::unique_ptr< 1106 return std::unique_ptr<
1105 ui::TouchHandleDrawable>(new CompositedTouchHandleDrawable( 1107 ui::TouchHandleDrawable>(new CompositedTouchHandleDrawable(
1106 content_view_core_->GetViewAndroid()->GetLayer(), 1108 content_view_core_->GetViewAndroid()->GetLayer(),
1107 ui::GetScaleFactorForNativeView(GetNativeView()), 1109 ui::GetScaleFactorForNativeView(GetNativeView()),
1108 // Use the activity context (instead of the application context) to ensure 1110 // Use the activity context (instead of the application context) to ensure
1109 // proper handle theming. 1111 // proper handle theming.
1110 content_view_core_->GetContext().obj())); 1112 content_view_core_->GetContext().obj()));
1111 } 1113 }
1112 1114
1113 void RenderWidgetHostViewAndroid::SynchronousCopyContents( 1115 void RenderWidgetHostViewAndroid::SynchronousCopyContents(
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after
1868 case ui::MotionEvent::ACTION_UP: 1870 case ui::MotionEvent::ACTION_UP:
1869 case ui::MotionEvent::ACTION_POINTER_UP: 1871 case ui::MotionEvent::ACTION_POINTER_UP:
1870 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", 1872 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED",
1871 delta.InMicroseconds(), 1, 1000000, 50); 1873 delta.InMicroseconds(), 1, 1000000, 50);
1872 default: 1874 default:
1873 return; 1875 return;
1874 } 1876 }
1875 } 1877 }
1876 1878
1877 } // namespace content 1879 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/synchronous_compositor_host.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698