| Index: content/common/input/synthetic_pointer_action_params.cc
|
| diff --git a/content/common/input/synthetic_pointer_action_params.cc b/content/common/input/synthetic_pointer_action_params.cc
|
| index 84efe479259462cfec12641b12359aefab239f52..7b858d6dcc66173cb142872db565ab60af2b76b5 100644
|
| --- a/content/common/input/synthetic_pointer_action_params.cc
|
| +++ b/content/common/input/synthetic_pointer_action_params.cc
|
| @@ -7,12 +7,45 @@
|
| namespace content {
|
|
|
| SyntheticPointerActionParams::SyntheticPointerActionParams()
|
| - : pointer_action_type_(PointerActionType::NOT_INITIALIZED), index_(0) {}
|
| + : pointer_action_type_(PointerActionType::NOT_INITIALIZED),
|
| + index_(0),
|
| + button_(Button::LEFT) {}
|
|
|
| SyntheticPointerActionParams::SyntheticPointerActionParams(
|
| PointerActionType action_type)
|
| - : pointer_action_type_(action_type), index_(0) {}
|
| + : pointer_action_type_(action_type), index_(0), button_(Button::LEFT) {}
|
|
|
| SyntheticPointerActionParams::~SyntheticPointerActionParams() {}
|
|
|
| +// static
|
| +unsigned SyntheticPointerActionParams::GetWebMouseEventModifier(
|
| + SyntheticPointerActionParams::Button button) {
|
| + switch (button) {
|
| + case SyntheticPointerActionParams::Button::LEFT:
|
| + return blink::WebMouseEvent::LeftButtonDown;
|
| + case SyntheticPointerActionParams::Button::MIDDLE:
|
| + return blink::WebMouseEvent::MiddleButtonDown;
|
| + case SyntheticPointerActionParams::Button::RIGHT:
|
| + return blink::WebMouseEvent::RightButtonDown;
|
| + }
|
| + NOTREACHED();
|
| + return blink::WebMouseEvent::NoModifiers;
|
| +}
|
| +
|
| +// static
|
| +blink::WebMouseEvent::Button
|
| +SyntheticPointerActionParams::GetWebMouseEventButton(
|
| + SyntheticPointerActionParams::Button button) {
|
| + switch (button) {
|
| + case SyntheticPointerActionParams::Button::LEFT:
|
| + return blink::WebMouseEvent::Button::Left;
|
| + case SyntheticPointerActionParams::Button::MIDDLE:
|
| + return blink::WebMouseEvent::Button::Middle;
|
| + case SyntheticPointerActionParams::Button::RIGHT:
|
| + return blink::WebMouseEvent::Button::Right;
|
| + }
|
| + NOTREACHED();
|
| + return blink::WebMouseEvent::Button::NoButton;
|
| +}
|
| +
|
| } // namespace content
|
|
|