Chromium Code Reviews| Index: content/common/input/synthetic_pointer_action_params.h |
| diff --git a/content/common/input/synthetic_pointer_action_params.h b/content/common/input/synthetic_pointer_action_params.h |
| index 4e51f036b7352174c7fa2573d0d9b0cd090da414..d077e4cdaf30854368255497383917f64fbb40ad 100644 |
| --- a/content/common/input/synthetic_pointer_action_params.h |
| +++ b/content/common/input/synthetic_pointer_action_params.h |
| @@ -29,7 +29,7 @@ struct CONTENT_EXPORT SyntheticPointerActionParams |
| PRESS, |
| MOVE, |
| RELEASE, |
| - PROCESS, |
| + IDLE, |
|
tdresser
2016/11/10 14:58:32
Can we add a comment here? Why did this name chang
lanwei
2016/11/10 19:45:23
Done.
|
| FINISH, |
| POINTER_ACTION_TYPE_MAX = FINISH |
| }; |
| @@ -49,11 +49,10 @@ struct CONTENT_EXPORT SyntheticPointerActionParams |
| } |
| void set_index(int index) { |
| - DCHECK(pointer_action_type_ != PointerActionType::PROCESS && |
| - pointer_action_type_ != PointerActionType::FINISH); |
| - // For all mouse pointer actions, the index should always be 0. |
| - DCHECK(gesture_source_type != MOUSE_INPUT || index == 0); |
| - index_ = index; |
| + DCHECK(pointer_action_type_ != PointerActionType::FINISH); |
| + // We only set index for source types which are not mouse. |
|
tdresser
2016/11/10 14:58:32
We shouldn't silently not do anything here.
if (g
lanwei
2016/11/10 19:45:23
Done.
|
| + if (gesture_source_type != MOUSE_INPUT) |
| + index_ = index; |
| } |
| void set_position(const gfx::PointF& position) { |
| @@ -65,9 +64,9 @@ struct CONTENT_EXPORT SyntheticPointerActionParams |
| PointerActionType pointer_action_type() const { return pointer_action_type_; } |
| int index() const { |
| - DCHECK(pointer_action_type_ != PointerActionType::PROCESS && |
| - pointer_action_type_ != PointerActionType::FINISH); |
| - DCHECK(gesture_source_type != MOUSE_INPUT || index_ == 0); |
| + DCHECK(pointer_action_type_ != PointerActionType::FINISH); |
| + // For source type of mouse, the index should always be -1 and never change. |
| + DCHECK(gesture_source_type != MOUSE_INPUT || index_ == -1); |
| return index_; |
| } |