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

Unified Diff: content/renderer/gpu/input_event_filter.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/renderer/gpu/input_event_filter.cc
diff --git a/content/renderer/gpu/input_event_filter.cc b/content/renderer/gpu/input_event_filter.cc
index 96a7034af160537f5c18054574e561c4d8094552..5bab44c979f50e240b642ead531f28280ab243d3 100644
--- a/content/renderer/gpu/input_event_filter.cc
+++ b/content/renderer/gpu/input_event_filter.cc
@@ -6,8 +6,10 @@
#include "base/debug/trace_event.h"
#include "base/location.h"
#include "base/message_loop_proxy.h"
+#include "content/common/child_thread.h"
joth 2013/05/31 18:05:08 why?
jdduke (slow) 2013/05/31 20:48:24 From a bygone age. Fixed.
#include "content/common/input_messages.h"
#include "content/renderer/gpu/input_event_filter.h"
+#include "ipc/ipc_sync_channel.h"
using WebKit::WebInputEvent;
@@ -15,23 +17,24 @@ namespace content {
InputEventFilter::InputEventFilter(
IPC::Listener* main_listener,
- const scoped_refptr<base::MessageLoopProxy>& target_loop,
- const Handler& handler)
+ const scoped_refptr<base::MessageLoopProxy>& target_loop)
: main_loop_(base::MessageLoopProxy::current()),
main_listener_(main_listener),
sender_(NULL),
- target_loop_(target_loop),
- handler_(handler) {
+ target_loop_(target_loop) {
DCHECK(target_loop_);
- DCHECK(!handler_.is_null());
}
-void InputEventFilter::AddRoute(int routing_id) {
+void InputEventFilter::DidBind(const Handler& handler) {
+ handler_ = handler;
+}
+
+void InputEventFilter::DidAddInputHandler(int routing_id) {
base::AutoLock locked(routes_lock_);
routes_.insert(routing_id);
}
-void InputEventFilter::RemoveRoute(int routing_id) {
+void InputEventFilter::DidRemoveInputHandler(int routing_id) {
base::AutoLock locked(routes_lock_);
routes_.erase(routing_id);
}
@@ -118,6 +121,7 @@ void InputEventFilter::ForwardToMainListener(const IPC::Message& message) {
}
void InputEventFilter::ForwardToHandler(const IPC::Message& message) {
+ DCHECK(!handler_.is_null());
DCHECK(target_loop_->BelongsToCurrentThread());
if (message.type() != InputMsg_HandleInputEvent::ID) {

Powered by Google App Engine
This is Rietveld 408576698