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

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

Issue 2265393002: Refactor compositor event handling path to be callback-based (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dtapuska's review, rename to DidHandleInputEventAndOverScroll Created 4 years, 3 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"
11 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
12 #include "content/common/input/input_event_ack_state.h" 12 #include "content/common/input/input_event_ack_state.h"
13 #include "third_party/WebKit/public/web/WebInputEvent.h" 13 #include "third_party/WebKit/public/web/WebInputEvent.h"
14 #include "ui/gfx/geometry/vector2d_f.h" 14 #include "ui/gfx/geometry/vector2d_f.h"
15 15
16 namespace ui {
17 class LatencyInfo;
18 struct DidOverscrollParams;
19 }
20
21 namespace cc { 16 namespace cc {
22 class InputHandler; 17 class InputHandler;
23 } 18 }
24 19
25 namespace ui { 20 namespace ui {
26 class SynchronousInputHandlerProxy; 21 class SynchronousInputHandlerProxy;
22 struct DidOverscrollParams;
27 } 23 }
28 24
29 namespace content { 25 namespace content {
30 class InputHandlerManager; 26 class InputHandlerManager;
31 27
32 class CONTENT_EXPORT InputHandlerManagerClient { 28 class CONTENT_EXPORT InputHandlerManagerClient {
33 public: 29 public:
34 virtual ~InputHandlerManagerClient() {} 30 virtual ~InputHandlerManagerClient() {}
35 31
36 // Called from the main thread. 32 // Called from the main thread.
37 virtual void SetInputHandlerManager(InputHandlerManager*) = 0; 33 virtual void SetInputHandlerManager(InputHandlerManager*) = 0;
38 virtual void NotifyInputEventHandled(int routing_id, 34 virtual void NotifyInputEventHandled(int routing_id,
39 blink::WebInputEvent::Type type, 35 blink::WebInputEvent::Type type,
40 InputEventAckState ack_result) = 0; 36 InputEventAckState ack_result) = 0;
41 virtual void ProcessRafAlignedInput(int routing_id) = 0; 37 virtual void ProcessRafAlignedInput(int routing_id) = 0;
42 38
43 // Called from the compositor thread. 39 // Called from the compositor thread.
44 virtual void RegisterRoutingID(int routing_id) = 0; 40 virtual void RegisterRoutingID(int routing_id) = 0;
45 virtual void UnregisterRoutingID(int routing_id) = 0; 41 virtual void UnregisterRoutingID(int routing_id) = 0;
42
43 // Fired when the overscroll was NOT caused by InputEvent.
44 // InputEvent associated overscroll will be returned along with the callback.
dtapuska 2016/08/30 18:33:50 Likely should reference what callback you are indi
chongz 2016/08/30 19:47:04 Done.
46 virtual void DidOverscroll(int routing_id, 45 virtual void DidOverscroll(int routing_id,
47 const ui::DidOverscrollParams& params) = 0; 46 const ui::DidOverscrollParams& params) = 0;
48 virtual void DidStartFlinging(int routing_id) = 0; 47 virtual void DidStartFlinging(int routing_id) = 0;
49 virtual void DidStopFlinging(int routing_id) = 0; 48 virtual void DidStopFlinging(int routing_id) = 0;
50 49
51 protected: 50 protected:
52 InputHandlerManagerClient() {} 51 InputHandlerManagerClient() {}
53 52
54 private: 53 private:
55 DISALLOW_COPY_AND_ASSIGN(InputHandlerManagerClient); 54 DISALLOW_COPY_AND_ASSIGN(InputHandlerManagerClient);
(...skipping 11 matching lines...) Expand all
67 protected: 66 protected:
68 SynchronousInputHandlerProxyClient() {} 67 SynchronousInputHandlerProxyClient() {}
69 68
70 private: 69 private:
71 DISALLOW_COPY_AND_ASSIGN(SynchronousInputHandlerProxyClient); 70 DISALLOW_COPY_AND_ASSIGN(SynchronousInputHandlerProxyClient);
72 }; 71 };
73 72
74 } // namespace content 73 } // namespace content
75 74
76 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_CLIENT_H_ 75 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698