Chromium Code Reviews| Index: content/browser/renderer_host/input/synthetic_mouse_driver.cc |
| diff --git a/content/browser/renderer_host/input/synthetic_mouse_driver.cc b/content/browser/renderer_host/input/synthetic_mouse_driver.cc |
| index 82dcbdd8a413df55d939127dc47de124f90d9822..32887e0dd081ee4a8b192819e13f9c91a1147713 100644 |
| --- a/content/browser/renderer_host/input/synthetic_mouse_driver.cc |
| +++ b/content/browser/renderer_host/input/synthetic_mouse_driver.cc |
| @@ -18,11 +18,11 @@ void SyntheticMouseDriver::DispatchEvent(SyntheticGestureTarget* target, |
| target->DispatchInputEventToPlatform(mouse_event_); |
| } |
| -int SyntheticMouseDriver::Press(float x, float y) { |
| +void SyntheticMouseDriver::Press(float x, float y, int index) { |
| + DCHECK_EQ(index, 0); |
| mouse_event_ = SyntheticWebMouseEventBuilder::Build( |
| blink::WebInputEvent::MouseDown, x, y, 0); |
| mouse_event_.clickCount = 1; |
| - return 0; |
| } |
| void SyntheticMouseDriver::Move(float x, float y, int index) { |
| @@ -44,9 +44,7 @@ void SyntheticMouseDriver::Release(int index) { |
| bool SyntheticMouseDriver::UserInputCheck( |
| const SyntheticPointerActionParams& params) const { |
| - if (params.gesture_source_type != SyntheticGestureParams::MOUSE_INPUT) |
| - return false; |
| - |
| + DCHECK_EQ(params.index(), 0); |
|
samuong
2016/12/21 00:02:26
If a WebDriver client sends a command to synthesiz
lanwei
2016/12/21 20:01:14
Because we do not use the index for mouse type, so
|
| if (params.pointer_action_type() == |
| SyntheticPointerActionParams::PointerActionType::NOT_INITIALIZED) { |
| return false; |