Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_MOUSE_DRIVER_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_MOUSE_DRIVER_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_MOUSE_DRIVER_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_MOUSE_DRIVER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "content/browser/renderer_host/input/synthetic_pointer_driver.h" | 9 #include "content/browser/renderer_host/input/synthetic_pointer_driver.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| 11 #include "content/common/input/synthetic_web_input_event_builders.h" | 11 #include "content/common/input/synthetic_web_input_event_builders.h" |
| 12 | 12 |
| 13 namespace content { | 13 namespace content { |
| 14 | 14 |
| 15 class CONTENT_EXPORT SyntheticMouseDriver : public SyntheticPointerDriver { | 15 class CONTENT_EXPORT SyntheticMouseDriver : public SyntheticPointerDriver { |
| 16 public: | 16 public: |
| 17 SyntheticMouseDriver(); | 17 SyntheticMouseDriver(); |
| 18 explicit SyntheticMouseDriver( | |
| 19 SyntheticGestureParams::GestureSourceType gesture_source_type); | |
| 18 ~SyntheticMouseDriver() override; | 20 ~SyntheticMouseDriver() override; |
| 19 | 21 |
| 20 void DispatchEvent(SyntheticGestureTarget* target, | 22 void DispatchEvent(SyntheticGestureTarget* target, |
| 21 const base::TimeTicks& timestamp) override; | 23 const base::TimeTicks& timestamp) override; |
| 22 | 24 |
| 23 void Press(float x, | 25 void Press(float x, |
| 24 float y, | 26 float y, |
| 25 int index = 0, | 27 int index = 0, |
| 26 SyntheticPointerActionParams::Button button = | 28 SyntheticPointerActionParams::Button button = |
| 27 SyntheticPointerActionParams::Button::LEFT) override; | 29 SyntheticPointerActionParams::Button::LEFT) override; |
| 28 void Move(float x, float y, int index = 0) override; | 30 void Move(float x, float y, int index = 0) override; |
| 29 void Release(int index = 0, | 31 void Release(int index = 0, |
| 30 SyntheticPointerActionParams::Button button = | 32 SyntheticPointerActionParams::Button button = |
| 31 SyntheticPointerActionParams::Button::LEFT) override; | 33 SyntheticPointerActionParams::Button::LEFT) override; |
| 32 | 34 |
| 33 bool UserInputCheck( | 35 bool UserInputCheck( |
| 34 const SyntheticPointerActionParams& params) const override; | 36 const SyntheticPointerActionParams& params) const override; |
| 35 | 37 |
| 36 private: | 38 private: |
| 37 blink::WebMouseEvent mouse_event_; | 39 blink::WebMouseEvent mouse_event_; |
| 38 unsigned last_modifiers_; | 40 unsigned last_modifiers_; |
| 41 blink::WebPointerProperties::PointerType pointer_type_; | |
|
tdresser
2017/01/25 15:22:46
WebMouseEvent is a WebPointerProperties, which alr
lanwei
2017/01/26 02:55:40
Acknowledged.
| |
| 39 | 42 |
| 40 DISALLOW_COPY_AND_ASSIGN(SyntheticMouseDriver); | 43 DISALLOW_COPY_AND_ASSIGN(SyntheticMouseDriver); |
| 41 }; | 44 }; |
| 42 | 45 |
| 43 } // namespace content | 46 } // namespace content |
| 44 | 47 |
| 45 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_MOUSE_DRIVER_H_ | 48 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_MOUSE_DRIVER_H_ |
| OLD | NEW |