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

Side by Side Diff: content/renderer/input/input_handler_manager_client.h

Issue 2162143002: Don't use PostTask queueing between compositor and main thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't ack mouse move right away send them unthrottled Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_CLIENT_H_ 5 #ifndef CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_CLIENT_H_
6 #define CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_CLIENT_H_ 6 #define CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_CLIENT_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/callback_forward.h" 9 #include "base/callback_forward.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 24 matching lines...) Expand all
35 // The Manager will supply a |handler| when bound to the client. This is valid 35 // The Manager will supply a |handler| when bound to the client. This is valid
36 // until the manager shuts down, at which point it supplies a null |handler|. 36 // until the manager shuts down, at which point it supplies a null |handler|.
37 // The client should only makes calls to |handler| on the compositor thread. 37 // The client should only makes calls to |handler| on the compositor thread.
38 typedef base::Callback< 38 typedef base::Callback<
39 InputEventAckState(int /*routing_id*/, 39 InputEventAckState(int /*routing_id*/,
40 const blink::WebInputEvent*, 40 const blink::WebInputEvent*,
41 ui::LatencyInfo* latency_info)> Handler; 41 ui::LatencyInfo* latency_info)> Handler;
42 42
43 // Called from the main thread. 43 // Called from the main thread.
44 virtual void SetBoundHandler(const Handler& handler) = 0; 44 virtual void SetBoundHandler(const Handler& handler) = 0;
45 virtual void NotifyInputEventHandled(int routing_id,
46 blink::WebInputEvent::Type type,
47 InputEventAckState ack_result) = 0;
45 48
46 // Called from the compositor thread. 49 // Called from the compositor thread.
47 virtual void RegisterRoutingID(int routing_id) = 0; 50 virtual void RegisterRoutingID(int routing_id) = 0;
48 virtual void UnregisterRoutingID(int routing_id) = 0; 51 virtual void UnregisterRoutingID(int routing_id) = 0;
49 virtual void DidOverscroll(int routing_id, 52 virtual void DidOverscroll(int routing_id,
50 const DidOverscrollParams& params) = 0; 53 const DidOverscrollParams& params) = 0;
51 virtual void DidStartFlinging(int routing_id) = 0; 54 virtual void DidStartFlinging(int routing_id) = 0;
52 virtual void DidStopFlinging(int routing_id) = 0; 55 virtual void DidStopFlinging(int routing_id) = 0;
53 virtual void NotifyInputEventHandled(int routing_id,
54 blink::WebInputEvent::Type type,
55 InputEventAckState ack_result) = 0;
56 56
57 protected: 57 protected:
58 InputHandlerManagerClient() {} 58 InputHandlerManagerClient() {}
59 59
60 private: 60 private:
61 DISALLOW_COPY_AND_ASSIGN(InputHandlerManagerClient); 61 DISALLOW_COPY_AND_ASSIGN(InputHandlerManagerClient);
62 }; 62 };
63 63
64 class CONTENT_EXPORT SynchronousInputHandlerProxyClient { 64 class CONTENT_EXPORT SynchronousInputHandlerProxyClient {
65 public: 65 public:
66 virtual ~SynchronousInputHandlerProxyClient() {} 66 virtual ~SynchronousInputHandlerProxyClient() {}
67 67
68 virtual void DidAddSynchronousHandlerProxy( 68 virtual void DidAddSynchronousHandlerProxy(
69 int routing_id, 69 int routing_id,
70 ui::SynchronousInputHandlerProxy* synchronous_handler) = 0; 70 ui::SynchronousInputHandlerProxy* synchronous_handler) = 0;
71 virtual void DidRemoveSynchronousHandlerProxy(int routing_id) = 0; 71 virtual void DidRemoveSynchronousHandlerProxy(int routing_id) = 0;
72 72
73 protected: 73 protected:
74 SynchronousInputHandlerProxyClient() {} 74 SynchronousInputHandlerProxyClient() {}
75 75
76 private: 76 private:
77 DISALLOW_COPY_AND_ASSIGN(SynchronousInputHandlerProxyClient); 77 DISALLOW_COPY_AND_ASSIGN(SynchronousInputHandlerProxyClient);
78 }; 78 };
79 79
80 } // namespace content 80 } // namespace content
81 81
82 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_CLIENT_H_ 82 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698