| 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..0f3846a4fd161911bec9737c64e6c957524803ea 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) {
|
| + target_loop_(target_loop) {
|
| DCHECK(target_loop_);
|
| - DCHECK(!handler_.is_null());
|
| }
|
|
|
| -void InputEventFilter::AddRoute(int routing_id) {
|
| +void InputEventFilter::SetHandler(const Handler& handler) {
|
| + DCHECK(main_loop_->BelongsToCurrentThread());
|
| + 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) {
|
|
|