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

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: create drawable from Java 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
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 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 ResetGestureDetection(); 1075 ResetGestureDetection();
1076 } 1076 }
1077 content_view_core_->OnSelectionEvent( 1077 content_view_core_->OnSelectionEvent(
1078 event, selection_controller_->GetStartPosition(), 1078 event, selection_controller_->GetStartPosition(),
1079 GetSelectionRect(*selection_controller_)); 1079 GetSelectionRect(*selection_controller_));
1080 } 1080 }
1081 1081
1082 std::unique_ptr<ui::TouchHandleDrawable> 1082 std::unique_ptr<ui::TouchHandleDrawable>
1083 RenderWidgetHostViewAndroid::CreateDrawable() { 1083 RenderWidgetHostViewAndroid::CreateDrawable() {
1084 DCHECK(content_view_core_); 1084 DCHECK(content_view_core_);
1085 if (!using_browser_compositor_) 1085 if (!using_browser_compositor_) {
1086 return PopupTouchHandleDrawable::Create( 1086 return std::unique_ptr<ui::TouchHandleDrawable>(
1087 content_view_core_, ui::GetScaleFactorForNativeView(GetNativeView())); 1087 sync_compositor_->client()->CreateDrawable());
boliu 2016/08/26 04:15:45 need a null check for sync_compositor_ here and re
Jinsuk Kim 2016/08/26 09:21:19 Done.
1088 1088 }
1089 return std::unique_ptr< 1089 return std::unique_ptr<
1090 ui::TouchHandleDrawable>(new CompositedTouchHandleDrawable( 1090 ui::TouchHandleDrawable>(new CompositedTouchHandleDrawable(
1091 content_view_core_->GetViewAndroid()->GetLayer(), 1091 content_view_core_->GetViewAndroid()->GetLayer(),
1092 ui::GetScaleFactorForNativeView(GetNativeView()), 1092 ui::GetScaleFactorForNativeView(GetNativeView()),
1093 // Use the activity context (instead of the application context) to ensure 1093 // Use the activity context (instead of the application context) to ensure
1094 // proper handle theming. 1094 // proper handle theming.
1095 content_view_core_->GetContext().obj())); 1095 content_view_core_->GetContext().obj()));
1096 } 1096 }
1097 1097
1098 void RenderWidgetHostViewAndroid::SynchronousCopyContents( 1098 void RenderWidgetHostViewAndroid::SynchronousCopyContents(
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
1857 case ui::MotionEvent::ACTION_UP: 1857 case ui::MotionEvent::ACTION_UP:
1858 case ui::MotionEvent::ACTION_POINTER_UP: 1858 case ui::MotionEvent::ACTION_POINTER_UP:
1859 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", 1859 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED",
1860 delta.InMicroseconds(), 1, 1000000, 50); 1860 delta.InMicroseconds(), 1, 1000000, 50);
1861 default: 1861 default:
1862 return; 1862 return;
1863 } 1863 }
1864 } 1864 }
1865 1865
1866 } // namespace content 1866 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698