Chromium Code Reviews| 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 #include "content/common/input/synthetic_pointer_action_params.h" |
| 14 | 14 |
| 15 namespace content { | 15 namespace content { |
| 16 | 16 |
| 17 class CONTENT_EXPORT SyntheticPointerAction : public SyntheticGesture { | 17 class CONTENT_EXPORT SyntheticPointerAction : public SyntheticGesture { |
| 18 public: | 18 public: |
| 19 explicit SyntheticPointerAction(const SyntheticPointerActionParams& params); | 19 explicit SyntheticPointerAction(const SyntheticPointerActionParams& params); |
| 20 SyntheticPointerAction(const SyntheticPointerActionParams& params, | 20 SyntheticPointerAction( |
| 21 SyntheticPointer* synthetic_pointer); | 21 const std::vector<SyntheticPointerActionParams>& param_list, |
| 22 SyntheticPointer* synthetic_pointer, | |
| 23 int* index_map); | |
| 22 ~SyntheticPointerAction() override; | 24 ~SyntheticPointerAction() override; |
| 23 | 25 |
| 24 SyntheticGesture::Result ForwardInputEvents( | 26 SyntheticGesture::Result ForwardInputEvents( |
| 25 const base::TimeTicks& timestamp, | 27 const base::TimeTicks& timestamp, |
| 26 SyntheticGestureTarget* target) override; | 28 SyntheticGestureTarget* target) override; |
| 27 | 29 |
| 28 void ForwardTouchOrMouseInputEvents(const base::TimeTicks& timestamp, | 30 void ForwardTouchOrMouseInputEvents(const base::TimeTicks& timestamp, |
| 29 SyntheticGestureTarget* target); | 31 SyntheticGestureTarget* target); |
| 30 | 32 |
| 33 void SetSyntheticPointer(SyntheticPointer* synthetic_pointer) { | |
| 34 synthetic_pointer_ = synthetic_pointer; | |
| 35 } | |
| 36 | |
| 31 private: | 37 private: |
| 38 std::vector<SyntheticPointerActionParams> param_list_; | |
| 39 SyntheticPointer* synthetic_pointer_; | |
|
tdresser
2016/04/18 15:24:39
What's the lifetime here? Should this be unique_pt
lanwei
2016/04/19 19:05:32
synthetic_pointer_ and index_map_ are passed to th
| |
| 40 int* index_map_; | |
|
tdresser
2016/04/18 15:24:39
Should this be unique_ptr?
| |
| 32 SyntheticPointerActionParams params_; | 41 SyntheticPointerActionParams params_; |
| 33 SyntheticPointer* synthetic_pointer_; | |
| 34 | 42 |
| 35 DISALLOW_COPY_AND_ASSIGN(SyntheticPointerAction); | 43 DISALLOW_COPY_AND_ASSIGN(SyntheticPointerAction); |
| 36 }; | 44 }; |
| 37 | 45 |
| 38 } // namespace content | 46 } // namespace content |
| 39 | 47 |
| 40 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_ACTION_H_ | 48 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_ACTION_H_ |
| OLD | NEW |