OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_ACTION_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_ACTION_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_ACTION_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_ACTION_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "content/browser/renderer_host/input/synthetic_gesture.h" | 9 #include "content/browser/renderer_host/input/synthetic_gesture.h" |
10 #include "content/browser/renderer_host/input/synthetic_gesture_target.h" | 10 #include "content/browser/renderer_host/input/synthetic_gesture_target.h" |
11 #include "content/browser/renderer_host/input/synthetic_pointer.h" | 11 #include "content/browser/renderer_host/input/synthetic_pointer.h" |
12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
| 13 #include "content/common/input/synthetic_pointer_action_params.h" |
13 | 14 |
14 namespace content { | 15 namespace content { |
15 | 16 |
16 class CONTENT_EXPORT SyntheticPointerAction : public SyntheticGesture { | 17 class CONTENT_EXPORT SyntheticPointerAction : public SyntheticGesture { |
17 public: | 18 public: |
18 SyntheticPointerAction( | 19 explicit SyntheticPointerAction(const SyntheticPointerActionParams& params); |
19 SyntheticGestureParams::GestureSourceType gesture_source_type, | 20 SyntheticPointerAction(const SyntheticPointerActionParams& params, |
20 PointerActionType pointer_action_type, | 21 SyntheticPointer* synthetic_pointer); |
21 SyntheticPointer* synthetic_pointer, | |
22 gfx::PointF position, | |
23 int index = 0); | |
24 ~SyntheticPointerAction() override; | 22 ~SyntheticPointerAction() override; |
25 | 23 |
26 SyntheticGesture::Result ForwardInputEvents( | 24 SyntheticGesture::Result ForwardInputEvents( |
27 const base::TimeTicks& timestamp, | 25 const base::TimeTicks& timestamp, |
28 SyntheticGestureTarget* target) override; | 26 SyntheticGestureTarget* target) override; |
29 | 27 |
30 void ForwardTouchOrMouseInputEvents(const base::TimeTicks& timestamp, | 28 void ForwardTouchOrMouseInputEvents(const base::TimeTicks& timestamp, |
31 SyntheticGestureTarget* target); | 29 SyntheticGestureTarget* target); |
32 | 30 |
33 private: | 31 private: |
34 SyntheticGestureParams::GestureSourceType gesture_source_type_; | 32 SyntheticPointerActionParams params_; |
35 PointerActionType pointer_action_type_; | |
36 gfx::PointF position_; | |
37 int index_; | |
38 SyntheticPointer* synthetic_pointer_; | 33 SyntheticPointer* synthetic_pointer_; |
39 | 34 |
40 DISALLOW_COPY_AND_ASSIGN(SyntheticPointerAction); | 35 DISALLOW_COPY_AND_ASSIGN(SyntheticPointerAction); |
41 }; | 36 }; |
42 | 37 |
43 } // namespace content | 38 } // namespace content |
44 | 39 |
45 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_ACTION_H_ | 40 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_ACTION_H_ |
OLD | NEW |