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

Unified Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 15920002: Fix WebView compositor input handling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Avoid DCHECKs when retrieving process ID Created 7 years, 6 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/sync_input_event_filter.cc ('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 5bf928b456fb32d6e2c6a41b6249ce9c9e81387e..caa1a5de93393c7c89ae8e88920017beb5da8704 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -19,6 +19,7 @@
#include "cc/output/compositor_frame.h"
#include "cc/output/compositor_frame_ack.h"
#include "content/browser/android/content_view_core_impl.h"
+#include "content/browser/android/in_process/synchronous_compositor_impl.h"
#include "content/browser/android/overscroll_glow.h"
#include "content/browser/gpu/gpu_surface_tracker.h"
#include "content/browser/renderer_host/compositor_impl_android.h"
@@ -829,10 +830,14 @@ void RenderWidgetHostViewAndroid::UnhandledWheelEvent(
InputEventAckState RenderWidgetHostViewAndroid::FilterInputEvent(
const WebKit::WebInputEvent& input_event) {
- if (!content_view_core_)
- return INPUT_EVENT_ACK_STATE_NOT_CONSUMED;
-
- return content_view_core_->FilterInputEvent(input_event);
+ if (host_) {
+ SynchronousCompositorImpl* compositor =
+ SynchronousCompositorImpl::FromID(host_->GetProcess()->GetID(),
+ host_->GetRoutingID());
+ if (compositor)
+ return compositor->HandleInputEvent(input_event);
+ }
+ return INPUT_EVENT_ACK_STATE_NOT_CONSUMED;
}
void RenderWidgetHostViewAndroid::OnAccessibilityNotifications(
« no previous file with comments | « content/browser/android/sync_input_event_filter.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698