OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 UI_OZONE_PUBLIC_INPUT_CONTROLLER_H_ | 5 #ifndef UI_OZONE_PUBLIC_INPUT_CONTROLLER_H_ |
6 #define UI_OZONE_PUBLIC_INPUT_CONTROLLER_H_ | 6 #define UI_OZONE_PUBLIC_INPUT_CONTROLLER_H_ |
7 | 7 |
| 8 #include <set> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
10 #include "ui/ozone/ozone_export.h" | 12 #include "ui/ozone/ozone_export.h" |
11 | 13 |
12 namespace base { | 14 namespace base { |
13 class TimeDelta; | 15 class TimeDelta; |
14 } | 16 } |
15 | 17 |
16 namespace ui { | 18 namespace ui { |
17 | 19 |
| 20 enum class DomCode; |
| 21 |
18 // Platform-specific interface for controlling input devices. | 22 // Platform-specific interface for controlling input devices. |
19 // | 23 // |
20 // The object provides methods for the preference page to configure input | 24 // The object provides methods for the preference page to configure input |
21 // devices w.r.t. the user setting. On ChromeOS, this replaces the inputcontrol | 25 // devices w.r.t. the user setting. On ChromeOS, this replaces the inputcontrol |
22 // script that is originally located at /opt/google/chrome/. | 26 // script that is originally located at /opt/google/chrome/. |
23 class OZONE_EXPORT InputController { | 27 class OZONE_EXPORT InputController { |
24 public: | 28 public: |
25 InputController() {} | 29 InputController() {} |
26 virtual ~InputController() {} | 30 virtual ~InputController() {} |
27 | 31 |
(...skipping 20 matching lines...) Expand all Loading... |
48 virtual void SetNaturalScroll(bool enabled) = 0; | 52 virtual void SetNaturalScroll(bool enabled) = 0; |
49 | 53 |
50 // Mouse settings. | 54 // Mouse settings. |
51 virtual void SetMouseSensitivity(int value) = 0; | 55 virtual void SetMouseSensitivity(int value) = 0; |
52 virtual void SetPrimaryButtonRight(bool right) = 0; | 56 virtual void SetPrimaryButtonRight(bool right) = 0; |
53 | 57 |
54 // Temporarily enable/disable Tap-to-click. Used to enhance the user | 58 // Temporarily enable/disable Tap-to-click. Used to enhance the user |
55 // experience in some use cases (e.g., typing, watching video). | 59 // experience in some use cases (e.g., typing, watching video). |
56 virtual void SetTapToClickPaused(bool state) = 0; | 60 virtual void SetTapToClickPaused(bool state) = 0; |
57 | 61 |
| 62 // Disables the internal touchpad. |
| 63 virtual void DisableInternalTouchpad() = 0; |
| 64 |
| 65 // Enables the internal touchpad. |
| 66 virtual void EnableInternalTouchpad() = 0; |
| 67 |
| 68 // Disables all keys on the internal keyboard except |excepted_keys|. |
| 69 virtual void DisableInternalKeyboardExceptKeys( |
| 70 scoped_ptr<std::set<DomCode>> excepted_keys) = 0; |
| 71 |
| 72 // Enables all keys on the internal keyboard. |
| 73 virtual void EnableInternalKeyboard() = 0; |
| 74 |
58 private: | 75 private: |
59 DISALLOW_COPY_AND_ASSIGN(InputController); | 76 DISALLOW_COPY_AND_ASSIGN(InputController); |
60 }; | 77 }; |
61 | 78 |
62 // Create an input controller that does nothing. | 79 // Create an input controller that does nothing. |
63 OZONE_EXPORT scoped_ptr<InputController> CreateStubInputController(); | 80 OZONE_EXPORT scoped_ptr<InputController> CreateStubInputController(); |
64 | 81 |
65 } // namespace ui | 82 } // namespace ui |
66 | 83 |
67 #endif // UI_OZONE_PUBLIC_INPUT_CONTROLLER_H_ | 84 #endif // UI_OZONE_PUBLIC_INPUT_CONTROLLER_H_ |
OLD | NEW |