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

Unified 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, 4 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_android.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
index 8d39adac14aca1e9154d03b6618015f244502712..0a30eafc252fbf60769c6cf52509f44bb42cfcd8 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -38,7 +38,6 @@
#include "content/browser/android/composited_touch_handle_drawable.h"
#include "content/browser/android/content_view_core_impl.h"
#include "content/browser/android/overscroll_controller_android.h"
-#include "content/browser/android/popup_touch_handle_drawable.h"
#include "content/browser/android/synchronous_compositor_host.h"
#include "content/browser/devtools/render_frame_devtools_agent_host.h"
#include "content/browser/gpu/browser_gpu_channel_host_factory.h"
@@ -58,6 +57,7 @@
#include "content/common/input_messages.h"
#include "content/common/view_messages.h"
#include "content/public/browser/android/compositor.h"
+#include "content/public/browser/android/synchronous_compositor_client.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/devtools_agent_host.h"
#include "content/public/browser/render_view_host.h"
@@ -1097,10 +1097,12 @@ void RenderWidgetHostViewAndroid::OnSelectionEvent(
std::unique_ptr<ui::TouchHandleDrawable>
RenderWidgetHostViewAndroid::CreateDrawable() {
DCHECK(content_view_core_);
- if (!using_browser_compositor_)
- return PopupTouchHandleDrawable::Create(
- content_view_core_, ui::GetScaleFactorForNativeView(GetNativeView()));
-
+ if (!using_browser_compositor_) {
+ if (!sync_compositor_)
+ return nullptr;
+ return std::unique_ptr<ui::TouchHandleDrawable>(
+ sync_compositor_->client()->CreateDrawable());
+ }
return std::unique_ptr<
ui::TouchHandleDrawable>(new CompositedTouchHandleDrawable(
content_view_core_->GetViewAndroid()->GetLayer(),
« 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