Chromium Code Reviews| Index: content/browser/renderer_host/input/synthetic_pointer_action.h |
| diff --git a/content/browser/renderer_host/input/synthetic_pointer_action.h b/content/browser/renderer_host/input/synthetic_pointer_action.h |
| index a87ef7370d6b9e0633d500045a1005406f169a46..39849c4980630919d9d3a7077564632297a7b070 100644 |
| --- a/content/browser/renderer_host/input/synthetic_pointer_action.h |
| +++ b/content/browser/renderer_host/input/synthetic_pointer_action.h |
| @@ -11,6 +11,7 @@ |
| #include "content/browser/renderer_host/input/synthetic_gesture_target.h" |
| #include "content/browser/renderer_host/input/synthetic_pointer.h" |
| #include "content/common/content_export.h" |
| +#include "content/common/input/synthetic_pointer_action_list_params.h" |
| #include "content/common/input/synthetic_pointer_action_params.h" |
| using blink::WebTouchEvent; |
| @@ -21,10 +22,9 @@ class CONTENT_EXPORT SyntheticPointerAction : public SyntheticGesture { |
| public: |
| using IndexMap = std::array<int, WebTouchEvent::kTouchesLengthCap>; |
|
tdresser
2016/10/31 14:22:57
The way IndexMap is exposed to consumers is a bit
tdresser
2016/10/31 14:22:57
It might make sense to wrap this up in a class, so
lanwei
2016/12/04 18:08:02
Done.
|
| - SyntheticPointerAction( |
| - std::unique_ptr<std::vector<SyntheticPointerActionParams>> param_list, |
| - SyntheticPointer* synthetic_pointer, |
| - IndexMap* index_map); |
| + SyntheticPointerAction(const SyntheticPointerActionListParams& params, |
| + SyntheticPointer* synthetic_pointer, |
| + IndexMap* index_map); |
| ~SyntheticPointerAction() override; |
| SyntheticGesture::Result ForwardInputEvents( |
| @@ -32,7 +32,8 @@ class CONTENT_EXPORT SyntheticPointerAction : public SyntheticGesture { |
| SyntheticGestureTarget* target) override; |
| private: |
| - explicit SyntheticPointerAction(const SyntheticPointerActionParams& params); |
| + explicit SyntheticPointerAction( |
| + const SyntheticPointerActionListParams& params); |
| SyntheticGesture::Result ForwardTouchOrMouseInputEvents( |
| const base::TimeTicks& timestamp, |
| SyntheticGestureTarget* target); |
| @@ -41,24 +42,25 @@ class CONTENT_EXPORT SyntheticPointerAction : public SyntheticGesture { |
| (*index_map_)[index] = point_index; |
| } |
| - // Check if the user inputs in the SyntheticPointerActionParams can generate |
| - // a valid sequence of pointer actions. |
| + // Check if the user inputs in the SyntheticPointerActionListParams can |
| + // generate a valid sequence of pointer actions. |
| bool UserInputCheck(const SyntheticPointerActionParams& params); |
| // SyntheticGestureController is responsible to create the |
| // SyntheticPointerActions and control when to forward them. |
| // This will be passed from SyntheticGestureController, which will reset its |
| // value to push a new batch of action parameters. |
| - // This contains a list of pointer actions which will be dispatched together. |
| - const std::unique_ptr<std::vector<SyntheticPointerActionParams>> param_list_; |
| + |
| + // This contains a list of pointer actions which will be dispatched together |
| + // in one frame. |
| + SyntheticPointerActionListParams params_; |
| + |
| // These two objects will be owned by SyntheticGestureController, which |
| // will manage their lifetime by initiating them when it starts processing a |
| // pointer action sequence and resetting them when it finishes. |
| SyntheticPointer* synthetic_pointer_; |
| IndexMap* index_map_; |
| - SyntheticPointerActionParams params_; |
| - |
| DISALLOW_COPY_AND_ASSIGN(SyntheticPointerAction); |
| }; |