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

Unified Diff: content/renderer/gpu/input_handler_manager.h

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_handler_manager.h
diff --git a/content/renderer/gpu/input_handler_manager.h b/content/renderer/gpu/input_handler_manager.h
index c33b5b772fdc75b8872145bcc109917a17a3c1cd..5b07802dbde0a6120823a8710f43c91f16354ed6 100644
--- a/content/renderer/gpu/input_handler_manager.h
+++ b/content/renderer/gpu/input_handler_manager.h
@@ -7,9 +7,9 @@
#include <map>
+#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "content/renderer/render_view_impl.h"
-#include "ipc/ipc_channel_proxy.h"
namespace base {
class MessageLoopProxy;
@@ -27,23 +27,24 @@ namespace content {
class InputEventFilter;
class InputHandlerWrapper;
+class InputHandlerManagerClient;
// InputHandlerManager class manages InputHandlerProxy instances for
// the WebViews in this renderer.
class InputHandlerManager {
public:
- // |main_listener| refers to the central IPC message listener that lives on
- // the main thread, where all incoming IPC messages are first handled.
// |message_loop_proxy| is the MessageLoopProxy of the compositor thread.
// The underlying MessageLoop must outlive this object.
InputHandlerManager(
- IPC::Listener* main_listener,
const scoped_refptr<base::MessageLoopProxy>& message_loop_proxy);
~InputHandlerManager();
- // This MessageFilter should be added to allow input events to be redirected
- // to the compositor's thread.
- IPC::ChannelProxy::MessageFilter* GetMessageFilter() const;
+ // Called from the main thread only. Only one client can be bound to an
+ // InputHandlerManager, and the client must outlive this object.
+ void BindToClient(InputHandlerManagerClient* client);
+
+ // Called from the compositor's thread.
+ InputHandlerManagerClient* client() { return client_; }
// Callable from the main thread only.
void AddInputHandler(
@@ -58,9 +59,6 @@ class InputHandlerManager {
void HandleInputEvent(int routing_id,
const WebKit::WebInputEvent* input_event);
- // Called from the compositor's thread.
- InputEventFilter* filter() { return filter_.get(); }
-
private:
// Called from the compositor's thread.
void AddInputHandlerOnCompositorThread(
@@ -74,7 +72,7 @@ class InputHandlerManager {
InputHandlerMap input_handlers_;
scoped_refptr<base::MessageLoopProxy> message_loop_proxy_;
- scoped_refptr<InputEventFilter> filter_;
+ InputHandlerManagerClient* client_;
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698