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 6b4e74c358f30a47118e3e086a83f25e61d3261b..ba5ab70e78ca07450adb5c7df022a35e265733e7 100644 |
| --- a/content/common/input/synthetic_pointer_action_params.h |
| +++ b/content/common/input/synthetic_pointer_action_params.h |
| @@ -51,6 +51,14 @@ struct CONTENT_EXPORT SyntheticPointerActionParams { |
| position_ = position; |
| } |
| + void set_button(int button) { |
| + DCHECK(pointer_action_type_ == PointerActionType::PRESS || |
| + pointer_action_type_ == PointerActionType::RELEASE); |
| + DCHECK_GE(button, 0); |
| + DCHECK_LT(button, 3); |
| + button_ = button; |
| + } |
| + |
| PointerActionType pointer_action_type() const { return pointer_action_type_; } |
| int index() const { |
| @@ -65,6 +73,14 @@ struct CONTENT_EXPORT SyntheticPointerActionParams { |
| return position_; |
| } |
| + int button() const { |
| + DCHECK(pointer_action_type_ == PointerActionType::PRESS || |
| + pointer_action_type_ == PointerActionType::RELEASE); |
| + DCHECK_GE(button_, 0); |
| + DCHECK_LT(button_, 3); |
|
Navid Zolghadr
2017/01/12 18:23:46
Shouldn't this be LE with the current code? Althou
lanwei
2017/01/13 17:29:30
Done.
|
| + return button_; |
| + } |
| + |
| private: |
| friend struct IPC::ParamTraits<content::SyntheticPointerActionParams>; |
| friend struct ipc_fuzzer::FuzzTraits<content::SyntheticPointerActionParams>; |
| @@ -75,6 +91,7 @@ struct CONTENT_EXPORT SyntheticPointerActionParams { |
| // The index of the pointer in the pointer action sequence passed from the |
| // user API. |
| int index_; |
| + int button_; |
| }; |
| } // namespace content |