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

Unified Diff: content/browser/android/content_view_core_impl.cc

Issue 15920002: Fix WebView compositor input handling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup Created 7 years, 7 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
Index: content/browser/android/content_view_core_impl.cc
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc
index abfe74ec48b7c4f3abb658d9641fbc89192b40d3..34f44e6807e4aff6d9a67cd51a56c5ff86a03c4c 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -17,7 +17,6 @@
#include "content/browser/android/interstitial_page_delegate_android.h"
#include "content/browser/android/load_url_params.h"
#include "content/browser/android/media_player_manager_impl.h"
-#include "content/browser/android/sync_input_event_filter.h"
#include "content/browser/android/touch_point.h"
#include "content/browser/renderer_host/compositor_impl_android.h"
#include "content/browser/renderer_host/java/java_bound_object.h"
@@ -30,6 +29,7 @@
#include "content/browser/web_contents/navigation_controller_impl.h"
#include "content/browser/web_contents/navigation_entry_impl.h"
#include "content/browser/web_contents/web_contents_view_android.h"
+#include "content/common/android/synchronous_input_event_filter.h"
#include "content/common/input_messages.h"
#include "content/common/view_messages.h"
#include "content/public/browser/browser_context.h"
@@ -160,7 +160,8 @@ ContentViewCoreImpl::ContentViewCoreImpl(JNIEnv* env, jobject obj,
root_layer_(cc::Layer::Create()),
tab_crashed_(false),
view_android_(view_android),
- window_android_(window_android) {
+ window_android_(window_android),
+ input_event_filter_(NULL) {
CHECK(web_contents) <<
"A ContentViewCoreImpl should be created with a valid WebContents.";
@@ -673,7 +674,9 @@ InputEventAckState ContentViewCoreImpl::FilterInputEvent(
if (!input_event_filter_)
return INPUT_EVENT_ACK_STATE_NOT_CONSUMED;
- return input_event_filter_->HandleInputEvent(input_event);
+ RenderViewHost* host = web_contents_->GetRenderViewHost();
+ return input_event_filter_->HandleInputEvent(host->GetRoutingID(),
+ input_event);
}
void ContentViewCoreImpl::AttachLayer(scoped_refptr<cc::Layer> layer) {
@@ -863,6 +866,11 @@ float ContentViewCoreImpl::GetDpiScale() const {
return dpi_scale_;
}
+void ContentViewCoreImpl::SetInputEventFilter(
+ SynchronousInputEventFilter* input_event_filter) {
+ input_event_filter_ = input_event_filter;
+}
+
void ContentViewCoreImpl::RequestContentClipping(
const gfx::Rect& clipping,
const gfx::Size& content_size) {

Powered by Google App Engine
This is Rietveld 408576698