| 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..5b2d0d4ef597eda40837150b34c52ce4ca0d4489 100644
|
| --- a/content/renderer/gpu/input_event_filter.cc
|
| +++ b/content/renderer/gpu/input_event_filter.cc
|
| @@ -8,6 +8,7 @@
|
| #include "base/message_loop_proxy.h"
|
| #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 +16,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 +96,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) {
|
| @@ -104,7 +108,7 @@ void InputEventFilter::ForwardToHandler(const IPC::Message& message) {
|
| }
|
|
|
| InputEventAckState ack = handler_.Run(message.routing_id(),
|
| - CrackMessage(message));
|
| + *CrackMessage(message));
|
|
|
| if (ack == INPUT_EVENT_ACK_STATE_NOT_CONSUMED) {
|
| TRACE_EVENT0("InputEventFilter::DidNotHandleInputEvent",
|
|
|