Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(415)

Side by Side Diff: ash/autoclick/autoclick_controller.h

Issue 27196006: Add autoclick to settings page under the accessibility section. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rtl ui Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 ASH_AUTOCLICK_AUTOCLICK_CONTROLLER_H 5 #ifndef ASH_AUTOCLICK_AUTOCLICK_CONTROLLER_H
6 #define ASH_AUTOCLICK_AUTOCLICK_CONTROLLER_H 6 #define ASH_AUTOCLICK_AUTOCLICK_CONTROLLER_H
7 7
8 #include "ash/ash_export.h"
9
8 namespace ash { 10 namespace ash {
9 11
10 // Controls the autoclick a11y feature in ash. 12 // Controls the autoclick a11y feature in ash.
11 // If enabled, we will automatically send a click event a short time after 13 // If enabled, we will automatically send a click event a short time after
12 // the mouse had been at rest. 14 // the mouse had been at rest.
13 class AutoclickController { 15 class ASH_EXPORT AutoclickController {
14 public: 16 public:
15 virtual ~AutoclickController() {} 17 virtual ~AutoclickController() {}
16 18
17 // Set whether autoclicking is enabled. 19 // Set whether autoclicking is enabled.
18 virtual void SetEnabled(bool enabled) = 0; 20 virtual void SetEnabled(bool enabled) = 0;
19 21
20 // Returns true if autoclicking is enabled. 22 // Returns true if autoclicking is enabled.
21 virtual bool IsEnabled() const = 0; 23 virtual bool IsEnabled() const = 0;
22 24
23 // Set the time to wait from when the mouse stops moving to when 25 // Set the time to wait in milliseconds from when the mouse stops moving
24 // the autoclick event is sent. 26 // to when the autoclick event is sent.
25 virtual void SetClickWaitTime(int wait_time_ms) = 0; 27 virtual void SetAutoclickDelay(int delay_ms) = 0;
26 28
27 // Returns the wait time in milliseconds. 29 // Returns the autoclick delay in milliseconds.
28 virtual int GetClickWaitTime() const = 0; 30 virtual int GetAutoclickDelay() const = 0;
29 31
30 static AutoclickController* CreateInstance(); 32 static AutoclickController* CreateInstance();
31 33
34 // The default wait time between last mouse movement and sending
35 // the autoclick.
36 static const int kDefaultAutoclickDelayMs;
37
32 protected: 38 protected:
33 AutoclickController() {} 39 AutoclickController() {}
34 }; 40 };
35 41
36 } // namespace ash 42 } // namespace ash
37 43
38 #endif // ASH_AUTOCLICK_AUTOCLICK_CONTROLLER_H 44 #endif // ASH_AUTOCLICK_AUTOCLICK_CONTROLLER_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698