| 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 | |
| 41 // Insert |text| into the active TextInputClient associated with |root_window|, | 38 // Insert |text| into the active TextInputClient associated with |root_window|, |
| 42 // if there is one. Returns true if |text| was successfully inserted. Note | 39 // if there is one. Returns true if |text| was successfully inserted. Note |
| 43 // that this may convert |text| into ui::KeyEvents for injection in some | 40 // that this may convert |text| into ui::KeyEvents for injection in some |
| 44 // special circumstances (i.e. VKEY_RETURN, VKEY_BACK). | 41 // special circumstances (i.e. VKEY_RETURN, VKEY_BACK). |
| 45 KEYBOARD_EXPORT bool InsertText(const base::string16& text, | 42 KEYBOARD_EXPORT bool InsertText(const base::string16& text, |
| 46 aura::Window* root_window); | 43 aura::Window* root_window); |
| 47 | 44 |
| 48 // Move cursor when swipe on the virtualkeyboard. Returns true if cursor was | 45 // Move cursor when swipe on the virtualkeyboard. Returns true if cursor was |
| 49 // successfully moved according to |swipe_direction|. | 46 // successfully moved according to |swipe_direction|. |
| 50 KEYBOARD_EXPORT bool MoveCursor(int swipe_direction, | 47 KEYBOARD_EXPORT bool MoveCursor(int swipe_direction, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 75 // resources in the returned array. | 72 // resources in the returned array. |
| 76 KEYBOARD_EXPORT const GritResourceMap* GetKeyboardExtensionResources( | 73 KEYBOARD_EXPORT const GritResourceMap* GetKeyboardExtensionResources( |
| 77 size_t* size); | 74 size_t* size); |
| 78 | 75 |
| 79 // Logs the keyboard control event as a UMA stat. | 76 // Logs the keyboard control event as a UMA stat. |
| 80 void LogKeyboardControlEvent(KeyboardControlEvent event); | 77 void LogKeyboardControlEvent(KeyboardControlEvent event); |
| 81 | 78 |
| 82 } // namespace keyboard | 79 } // namespace keyboard |
| 83 | 80 |
| 84 #endif // UI_KEYBOARD_KEYBOARD_UTIL_H_ | 81 #endif // UI_KEYBOARD_KEYBOARD_UTIL_H_ |
| OLD | NEW |