Index: content/browser/renderer_host/input/synthetic_pointer_action.cc |
diff --git a/content/browser/renderer_host/input/synthetic_pointer_action.cc b/content/browser/renderer_host/input/synthetic_pointer_action.cc |
index a701ce51f0281ea0165a6d4c803d16f93e797dc3..7a3d0ee801741d89045bbf4936b33f1518ccb9f2 100644 |
--- a/content/browser/renderer_host/input/synthetic_pointer_action.cc |
+++ b/content/browser/renderer_host/input/synthetic_pointer_action.cc |
@@ -11,14 +11,14 @@ |
namespace content { |
SyntheticPointerAction::SyntheticPointerAction( |
- const SyntheticPointerActionParams& params) |
+ const SyntheticPointerActionListParams& params) |
: params_(params) {} |
SyntheticPointerAction::SyntheticPointerAction( |
- std::unique_ptr<std::vector<SyntheticPointerActionParams>> param_list, |
+ const SyntheticPointerActionListParams& params, |
SyntheticPointer* synthetic_pointer, |
IndexMap* index_map) |
- : param_list_(std::move(param_list)), |
+ : params_(params), |
synthetic_pointer_(synthetic_pointer), |
index_map_(index_map) {} |
@@ -28,6 +28,8 @@ SyntheticGesture::Result SyntheticPointerAction::ForwardInputEvents( |
const base::TimeTicks& timestamp, |
SyntheticGestureTarget* target) { |
DCHECK(synthetic_pointer_); |
+ DCHECK_NE(synthetic_pointer_->SourceType(), |
+ SyntheticGestureParams::DEFAULT_INPUT); |
return ForwardTouchOrMouseInputEvents(timestamp, target); |
} |
@@ -35,7 +37,10 @@ SyntheticGesture::Result SyntheticPointerAction::ForwardTouchOrMouseInputEvents( |
const base::TimeTicks& timestamp, |
SyntheticGestureTarget* target) { |
int point_index; |
- for (const SyntheticPointerActionParams& params : *param_list_) { |
+ for (SyntheticPointerActionParams& params : params_.param_list) { |
+ if (params.gesture_source_type == SyntheticGestureParams::DEFAULT_INPUT) |
+ params.gesture_source_type = synthetic_pointer_->SourceType(); |
+ |
if (!UserInputCheck(params)) |
return POINTER_ACTION_INPUT_INVALID; |
@@ -55,12 +60,14 @@ SyntheticGesture::Result SyntheticPointerAction::ForwardTouchOrMouseInputEvents( |
synthetic_pointer_->Release(point_index, target, timestamp); |
SetPointIndex(params.index(), -1); |
break; |
+ case SyntheticPointerActionParams::PointerActionType::FINISH: |
+ return GESTURE_FINISHED; |
default: |
return POINTER_ACTION_INPUT_INVALID; |
} |
} |
synthetic_pointer_->DispatchEvent(target, timestamp); |
- return GESTURE_FINISHED; |
+ return GESTURE_RUNNING; |
} |
bool SyntheticPointerAction::UserInputCheck( |