Chromium Code Reviews| Index: ash/autoclick/autoclick_controller.h |
| diff --git a/ash/autoclick/autoclick_controller.h b/ash/autoclick/autoclick_controller.h |
| index 46b9ef48089678fab9e38bc0bebfbc1c67411b14..3e9456031e479fd5e6c4c1d20c8a00bcbeb02a4c 100644 |
| --- a/ash/autoclick/autoclick_controller.h |
| +++ b/ash/autoclick/autoclick_controller.h |
| @@ -5,7 +5,11 @@ |
| #ifndef ASH_AUTOCLICK_AUTOCLICK_CONTROLLER_H |
| #define ASH_AUTOCLICK_AUTOCLICK_CONTROLLER_H |
| +#include <memory> |
| + |
| #include "ash/ash_export.h" |
| +#include "base/macros.h" |
| +#include "ui/gfx/geometry/point.h" |
| namespace ash { |
| @@ -14,15 +18,38 @@ namespace ash { |
| // the mouse had been at rest. |
| class ASH_EXPORT AutoclickController { |
| public: |
| + class Delegate { |
| + public: |
| + Delegate() {} |
| + virtual ~Delegate() {} |
| + |
| + // Called when an autoclick gesture begins. |
| + virtual void StartGesture(int duration_ms, gfx::Point center) = 0; |
| + |
| + // Called when the gesture has ended, |
| + // either because the mouse moved or because the autoclick completed. |
| + virtual void StopGesture() = 0; |
| + |
| + // Called when the autoclick target has changed. |
| + virtual void SetGestureCenter(gfx::Point center) = 0; |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(Delegate); |
| + }; |
| + |
| virtual ~AutoclickController() {} |
| + // Set the delegate to work with. |
| + virtual void SetDelegate( |
| + std::unique_ptr<Delegate> autoclickgesture_delegate) = 0; |
|
jdufault
2016/06/08 17:50:19
Just |delegate|.
sammiequon
2016/06/09 04:03:46
Done.
|
| + |
| // Set whether autoclicking is enabled. |
| virtual void SetEnabled(bool enabled) = 0; |
| // Returns true if autoclicking is enabled. |
| virtual bool IsEnabled() const = 0; |
| - // Set the time to wait in milliseconds from when the mouse stops moving |
| + // Set the time to wait in milliseconds from when the mouse stops movin |
|
jdufault
2016/06/08 17:50:19
moving?
sammiequon
2016/06/09 04:03:46
Done.
|
| // to when the autoclick event is sent. |
| virtual void SetAutoclickDelay(int delay_ms) = 0; |