| 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 99330cd7b65b3e1d4efa14a6c42327114d361d54..ffd6fbedbe5112dd21a6dfcf07caa38901a0eea0 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/popup_touch_handle_drawable.h"
|
| #include "content/public/browser/browser_thread.h"
|
| #include "content/public/browser/devtools_agent_host.h"
|
| #include "content/public/browser/render_view_host.h"
|
| @@ -1082,17 +1082,21 @@ 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()));
|
| -
|
| - return std::unique_ptr<
|
| - ui::TouchHandleDrawable>(new CompositedTouchHandleDrawable(
|
| - content_view_core_->GetViewAndroid()->GetLayer(),
|
| - ui::GetScaleFactorForNativeView(GetNativeView()),
|
| - // Use the activity context (instead of the application context) to ensure
|
| - // proper handle theming.
|
| - content_view_core_->GetContext().obj()));
|
| + std::unique_ptr<ui::TouchHandleDrawable> drawable = !using_browser_compositor_
|
| + ? PopupTouchHandleDrawable::Create(
|
| + content_view_core_,
|
| + ui::GetScaleFactorForNativeView(GetNativeView()))
|
| + : std::unique_ptr<
|
| + ui::TouchHandleDrawable>(new CompositedTouchHandleDrawable(
|
| + content_view_core_->GetViewAndroid()->GetLayer(),
|
| + ui::GetScaleFactorForNativeView(GetNativeView()),
|
| + // Use the activity context (instead of the application context)
|
| + // to ensure proper handle theming.
|
| + content_view_core_->GetContext().obj()));
|
| + WebContentsImpl* web_contents_impl =
|
| + static_cast<WebContentsImpl*>(content_view_core_->GetWebContents());
|
| + web_contents_impl->OnDidCreateTouchHandle(drawable.get());
|
| + return drawable;
|
| }
|
|
|
| void RenderWidgetHostViewAndroid::SynchronousCopyContents(
|
|
|