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 23b23fa421be29b1254cd491eebcbaff13adbb06..ed35e0fc3e50b2e3fae1ecfb0552a8c5edd7af42 100644 |
| --- a/content/browser/renderer_host/input/synthetic_pointer_action.h |
| +++ b/content/browser/renderer_host/input/synthetic_pointer_action.h |
| @@ -5,6 +5,7 @@ |
| #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_ACTION_H_ |
| #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_ACTION_H_ |
| +#include <array> |
| #include "base/macros.h" |
| #include "content/browser/renderer_host/input/synthetic_gesture.h" |
| #include "content/browser/renderer_host/input/synthetic_gesture_target.h" |
| @@ -12,25 +13,42 @@ |
| #include "content/common/content_export.h" |
| #include "content/common/input/synthetic_pointer_action_params.h" |
| +using blink::WebTouchEvent; |
| + |
| namespace content { |
| class CONTENT_EXPORT SyntheticPointerAction : public SyntheticGesture { |
| public: |
| + using IndexMap = std::array<int, WebTouchEvent::touchesLengthCap>; |
| + |
| explicit SyntheticPointerAction(const SyntheticPointerActionParams& params); |
| - SyntheticPointerAction(const SyntheticPointerActionParams& params, |
| - SyntheticPointer* synthetic_pointer); |
| + SyntheticPointerAction( |
| + const std::vector<SyntheticPointerActionParams>& param_list, |
| + SyntheticPointer* synthetic_pointer, |
| + IndexMap* index_map); |
| ~SyntheticPointerAction() override; |
| SyntheticGesture::Result ForwardInputEvents( |
| const base::TimeTicks& timestamp, |
| SyntheticGestureTarget* target) override; |
| - void ForwardTouchOrMouseInputEvents(const base::TimeTicks& timestamp, |
| - SyntheticGestureTarget* target); |
| + SyntheticGesture::Result ForwardTouchOrMouseInputEvents( |
| + const base::TimeTicks& timestamp, |
| + SyntheticGestureTarget* target); |
| + |
| + void SetSyntheticPointer(SyntheticPointer* synthetic_pointer) { |
| + synthetic_pointer_ = synthetic_pointer; |
| + } |
| private: |
| - SyntheticPointerActionParams params_; |
| + // These three objects are owned by SyntheticPointerActionController, which |
| + // will manage their lifetime by initiating them when it starts processing a |
| + // pointer action sequence and resets them when finish. |
|
tdresser
2016/05/20 14:24:31
resets them when it finishes.
lanwei
2016/05/23 16:40:50
Done.
|
| + std::vector<SyntheticPointerActionParams> param_list_; |
| SyntheticPointer* synthetic_pointer_; |
| + IndexMap* index_map_; |
|
tdresser
2016/05/20 14:24:31
I'd add a private accessor for index_map_,
const
lanwei
2016/05/23 16:40:50
I need to change the index_map_ in the case of pre
|
| + |
| + SyntheticPointerActionParams params_; |
| DISALLOW_COPY_AND_ASSIGN(SyntheticPointerAction); |
| }; |