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

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

Issue 2341873002: Handle touchpad flings with passive event listeners on compositor thread. (Closed)
Patch Set: Add dcheck for blimp Created 4 years, 2 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/events/blink/scoped_web_input_event.h"
14 #include "ui/gfx/geometry/vector2d_f.h" 15 #include "ui/gfx/geometry/vector2d_f.h"
15 16
16 namespace cc { 17 namespace cc {
17 class InputHandler; 18 class InputHandler;
18 } 19 }
19 20
20 namespace ui { 21 namespace ui {
22 class LatencyInfo;
21 class SynchronousInputHandlerProxy; 23 class SynchronousInputHandlerProxy;
22 struct DidOverscrollParams; 24 struct DidOverscrollParams;
23 } 25 }
24 26
25 namespace content { 27 namespace content {
26 class InputHandlerManager; 28 class InputHandlerManager;
27 29
28 class CONTENT_EXPORT InputHandlerManagerClient { 30 class CONTENT_EXPORT InputHandlerManagerClient {
29 public: 31 public:
30 virtual ~InputHandlerManagerClient() {} 32 virtual ~InputHandlerManagerClient() {}
31 33
32 // Called from the main thread. 34 // Called from the main thread.
33 virtual void SetInputHandlerManager(InputHandlerManager*) = 0; 35 virtual void SetInputHandlerManager(InputHandlerManager*) = 0;
34 virtual void NotifyInputEventHandled(int routing_id, 36 virtual void NotifyInputEventHandled(int routing_id,
35 blink::WebInputEvent::Type type, 37 blink::WebInputEvent::Type type,
36 InputEventAckState ack_result) = 0; 38 InputEventAckState ack_result) = 0;
37 virtual void ProcessRafAlignedInput(int routing_id) = 0; 39 virtual void ProcessRafAlignedInput(int routing_id) = 0;
38 40
39 // Called from the compositor thread. 41 // Called from the compositor thread.
40 virtual void RegisterRoutingID(int routing_id) = 0; 42 virtual void RegisterRoutingID(int routing_id) = 0;
41 virtual void UnregisterRoutingID(int routing_id) = 0; 43 virtual void UnregisterRoutingID(int routing_id) = 0;
42 44
43 // |HandleInputEvent| will respond to overscroll by calling the passed in 45 // |HandleInputEvent| will respond to overscroll by calling the passed in
44 // callback. 46 // callback.
45 // Otherwise |DidOverscroll| will be fired. 47 // Otherwise |DidOverscroll| will be fired.
46 virtual void DidOverscroll(int routing_id, 48 virtual void DidOverscroll(int routing_id,
47 const ui::DidOverscrollParams& params) = 0; 49 const ui::DidOverscrollParams& params) = 0;
48 virtual void DidStartFlinging(int routing_id) = 0; 50 virtual void DidStartFlinging(int routing_id) = 0;
49 virtual void DidStopFlinging(int routing_id) = 0; 51 virtual void DidStopFlinging(int routing_id) = 0;
52 virtual void DispatchNonBlockingEventToMainThread(
53 int routing_id,
54 ui::ScopedWebInputEvent event,
55 const ui::LatencyInfo& latency_info) = 0;
50 56
51 protected: 57 protected:
52 InputHandlerManagerClient() {} 58 InputHandlerManagerClient() {}
53 59
54 private: 60 private:
55 DISALLOW_COPY_AND_ASSIGN(InputHandlerManagerClient); 61 DISALLOW_COPY_AND_ASSIGN(InputHandlerManagerClient);
56 }; 62 };
57 63
58 class CONTENT_EXPORT SynchronousInputHandlerProxyClient { 64 class CONTENT_EXPORT SynchronousInputHandlerProxyClient {
59 public: 65 public:
60 virtual ~SynchronousInputHandlerProxyClient() {} 66 virtual ~SynchronousInputHandlerProxyClient() {}
61 67
62 virtual void DidAddSynchronousHandlerProxy( 68 virtual void DidAddSynchronousHandlerProxy(
63 int routing_id, 69 int routing_id,
64 ui::SynchronousInputHandlerProxy* synchronous_handler) = 0; 70 ui::SynchronousInputHandlerProxy* synchronous_handler) = 0;
65 virtual void DidRemoveSynchronousHandlerProxy(int routing_id) = 0; 71 virtual void DidRemoveSynchronousHandlerProxy(int routing_id) = 0;
66 72
67 protected: 73 protected:
68 SynchronousInputHandlerProxyClient() {} 74 SynchronousInputHandlerProxyClient() {}
69 75
70 private: 76 private:
71 DISALLOW_COPY_AND_ASSIGN(SynchronousInputHandlerProxyClient); 77 DISALLOW_COPY_AND_ASSIGN(SynchronousInputHandlerProxyClient);
72 }; 78 };
73 79
74 } // namespace content 80 } // namespace content
75 81
76 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_CLIENT_H_ 82 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_CLIENT_H_
OLDNEW
« no previous file with comments | « content/renderer/input/input_handler_manager.cc ('k') | content/renderer/input/input_handler_wrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698