OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 UI_KEYBOARD_KEYBOARD_UTIL_H_ | 5 #ifndef UI_KEYBOARD_KEYBOARD_UTIL_H_ |
6 #define UI_KEYBOARD_KEYBOARD_UTIL_H_ | 6 #define UI_KEYBOARD_KEYBOARD_UTIL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 enum KeyboardControlEvent { | 28 enum KeyboardControlEvent { |
29 KEYBOARD_CONTROL_SHOW = 0, | 29 KEYBOARD_CONTROL_SHOW = 0, |
30 KEYBOARD_CONTROL_HIDE_AUTO, | 30 KEYBOARD_CONTROL_HIDE_AUTO, |
31 KEYBOARD_CONTROL_HIDE_USER, | 31 KEYBOARD_CONTROL_HIDE_USER, |
32 KEYBOARD_CONTROL_MAX, | 32 KEYBOARD_CONTROL_MAX, |
33 }; | 33 }; |
34 | 34 |
35 // Returns true if the virtual keyboard is enabled. | 35 // Returns true if the virtual keyboard is enabled. |
36 KEYBOARD_EXPORT bool IsKeyboardEnabled(); | 36 KEYBOARD_EXPORT bool IsKeyboardEnabled(); |
37 | 37 |
| 38 // Returns true if the keyboard usability test is enabled. |
| 39 KEYBOARD_EXPORT bool IsKeyboardUsabilityExperimentEnabled(); |
| 40 |
38 // Insert |text| into the active TextInputClient associated with |root_window|, | 41 // Insert |text| into the active TextInputClient associated with |root_window|, |
39 // if there is one. Returns true if |text| was successfully inserted. Note | 42 // if there is one. Returns true if |text| was successfully inserted. Note |
40 // that this may convert |text| into ui::KeyEvents for injection in some | 43 // that this may convert |text| into ui::KeyEvents for injection in some |
41 // special circumstances (i.e. VKEY_RETURN, VKEY_BACK). | 44 // special circumstances (i.e. VKEY_RETURN, VKEY_BACK). |
42 KEYBOARD_EXPORT bool InsertText(const base::string16& text, | 45 KEYBOARD_EXPORT bool InsertText(const base::string16& text, |
43 aura::Window* root_window); | 46 aura::Window* root_window); |
44 | 47 |
45 // Move cursor when swipe on the virtualkeyboard. Returns true if cursor was | 48 // Move cursor when swipe on the virtualkeyboard. Returns true if cursor was |
46 // successfully moved according to |swipe_direction|. | 49 // successfully moved according to |swipe_direction|. |
47 KEYBOARD_EXPORT bool MoveCursor(int swipe_direction, | 50 KEYBOARD_EXPORT bool MoveCursor(int swipe_direction, |
(...skipping 24 matching lines...) Expand all Loading... |
72 // resources in the returned array. | 75 // resources in the returned array. |
73 KEYBOARD_EXPORT const GritResourceMap* GetKeyboardExtensionResources( | 76 KEYBOARD_EXPORT const GritResourceMap* GetKeyboardExtensionResources( |
74 size_t* size); | 77 size_t* size); |
75 | 78 |
76 // Logs the keyboard control event as a UMA stat. | 79 // Logs the keyboard control event as a UMA stat. |
77 void LogKeyboardControlEvent(KeyboardControlEvent event); | 80 void LogKeyboardControlEvent(KeyboardControlEvent event); |
78 | 81 |
79 } // namespace keyboard | 82 } // namespace keyboard |
80 | 83 |
81 #endif // UI_KEYBOARD_KEYBOARD_UTIL_H_ | 84 #endif // UI_KEYBOARD_KEYBOARD_UTIL_H_ |
OLD | NEW |