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

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: 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/renderer/gpu/input_event_filter.h ('k') | content/renderer/gpu/input_event_filter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9085c156922c6d4c4b2ba18c7d854478d597e98b..4032e8f0372ba7564de7b30a6c75d172dc9ceeaa 100644
--- a/content/renderer/gpu/input_event_filter.cc
+++ b/content/renderer/gpu/input_event_filter.cc
@@ -15,23 +15,25 @@ 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) {
- DCHECK(target_loop_.get());
- DCHECK(!handler_.is_null());
+ target_loop_(target_loop) {
+ DCHECK(target_loop_);
+}
+
+void InputEventFilter::SetBoundHandler(const Handler& handler) {
+ DCHECK(main_loop_->BelongsToCurrentThread());
+ handler_ = handler;
}
-void InputEventFilter::AddRoute(int routing_id) {
+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);
}
@@ -93,6 +95,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) {
« no previous file with comments | « content/renderer/gpu/input_event_filter.h ('k') | content/renderer/gpu/input_event_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698