| 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: |
| 19 explicit SyntheticPointerAction(const SyntheticPointerActionParams& params); |
| 18 SyntheticPointerAction( | 20 SyntheticPointerAction( |
| 19 SyntheticGestureParams::GestureSourceType gesture_source_type, | 21 SyntheticGestureParams::GestureSourceType gesture_source_type, |
| 20 PointerActionType pointer_action_type, | 22 SyntheticGestureParams::PointerActionType pointer_action_type, |
| 21 SyntheticPointer* synthetic_pointer, | 23 SyntheticPointer* synthetic_pointer, |
| 22 gfx::PointF position, | 24 gfx::PointF position, |
| 23 int index = 0); | 25 int index = 0); |
| 24 ~SyntheticPointerAction() override; | 26 ~SyntheticPointerAction() override; |
| 25 | 27 |
| 26 SyntheticGesture::Result ForwardInputEvents( | 28 SyntheticGesture::Result ForwardInputEvents( |
| 27 const base::TimeTicks& timestamp, | 29 const base::TimeTicks& timestamp, |
| 28 SyntheticGestureTarget* target) override; | 30 SyntheticGestureTarget* target) override; |
| 29 | 31 |
| 30 void ForwardTouchOrMouseInputEvents(const base::TimeTicks& timestamp, | 32 void ForwardTouchOrMouseInputEvents(const base::TimeTicks& timestamp, |
| 31 SyntheticGestureTarget* target); | 33 SyntheticGestureTarget* target); |
| 32 | 34 |
| 33 private: | 35 private: |
| 36 SyntheticPointerActionParams params_; |
| 34 SyntheticGestureParams::GestureSourceType gesture_source_type_; | 37 SyntheticGestureParams::GestureSourceType gesture_source_type_; |
| 35 PointerActionType pointer_action_type_; | 38 SyntheticGestureParams::PointerActionType pointer_action_type_; |
| 36 gfx::PointF position_; | 39 gfx::PointF position_; |
| 37 int index_; | 40 int index_; |
| 38 SyntheticPointer* synthetic_pointer_; | 41 SyntheticPointer* synthetic_pointer_; |
| 39 | 42 |
| 40 DISALLOW_COPY_AND_ASSIGN(SyntheticPointerAction); | 43 DISALLOW_COPY_AND_ASSIGN(SyntheticPointerAction); |
| 41 }; | 44 }; |
| 42 | 45 |
| 43 } // namespace content | 46 } // namespace content |
| 44 | 47 |
| 45 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_ACTION_H_ | 48 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_ACTION_H_ |
| OLD | NEW |