| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/renderer/gpu/input_handler_manager.h" | 5 #include "content/renderer/gpu/input_handler_manager.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 9 #include "cc/input/input_handler.h" | 9 #include "cc/input/input_handler.h" |
| 10 #include "content/renderer/gpu/input_event_filter.h" | 10 #include "content/renderer/gpu/input_event_filter.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 message_loop_proxy, | 24 message_loop_proxy, |
| 25 base::Bind(&InputHandlerManager::HandleInputEvent, | 25 base::Bind(&InputHandlerManager::HandleInputEvent, |
| 26 base::Unretained(this))); | 26 base::Unretained(this))); |
| 27 } | 27 } |
| 28 | 28 |
| 29 InputHandlerManager::~InputHandlerManager() { | 29 InputHandlerManager::~InputHandlerManager() { |
| 30 } | 30 } |
| 31 | 31 |
| 32 IPC::ChannelProxy::MessageFilter* | 32 IPC::ChannelProxy::MessageFilter* |
| 33 InputHandlerManager::GetMessageFilter() const { | 33 InputHandlerManager::GetMessageFilter() const { |
| 34 return filter_; | 34 return filter_.get(); |
| 35 } | 35 } |
| 36 | 36 |
| 37 void InputHandlerManager::AddInputHandler( | 37 void InputHandlerManager::AddInputHandler( |
| 38 int routing_id, | 38 int routing_id, |
| 39 const base::WeakPtr<cc::InputHandler>& input_handler, | 39 const base::WeakPtr<cc::InputHandler>& input_handler, |
| 40 const base::WeakPtr<RenderViewImpl>& render_view_impl) { | 40 const base::WeakPtr<RenderViewImpl>& render_view_impl) { |
| 41 DCHECK(!message_loop_proxy_->BelongsToCurrentThread()); | 41 DCHECK(!message_loop_proxy_->BelongsToCurrentThread()); |
| 42 | 42 |
| 43 message_loop_proxy_->PostTask( | 43 message_loop_proxy_->PostTask( |
| 44 FROM_HERE, | 44 FROM_HERE, |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 "NoInputHandlerFound"); | 92 "NoInputHandlerFound"); |
| 93 // Oops, we no longer have an interested input handler.. | 93 // Oops, we no longer have an interested input handler.. |
| 94 filter_->DidNotHandleInputEvent(true); | 94 filter_->DidNotHandleInputEvent(true); |
| 95 return; | 95 return; |
| 96 } | 96 } |
| 97 | 97 |
| 98 it->second->input_handler_proxy()->HandleInputEvent(*input_event); | 98 it->second->input_handler_proxy()->HandleInputEvent(*input_event); |
| 99 } | 99 } |
| 100 | 100 |
| 101 } // namespace content | 101 } // namespace content |
| OLD | NEW |