diff options
Diffstat (limited to 'ui/keyboard/keyboard_util.h')
-rw-r--r-- | ui/keyboard/keyboard_util.h | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/ui/keyboard/keyboard_util.h b/ui/keyboard/keyboard_util.h index 0674fa1..1245f97 100644 --- a/ui/keyboard/keyboard_util.h +++ b/ui/keyboard/keyboard_util.h @@ -7,14 +7,11 @@ #include <string> +#include "base/strings/string16.h" #include "ui/keyboard/keyboard_export.h" -namespace base { -class ListValue; -} - -namespace ui { -class KeyEvent; +namespace aura { +class RootWindow; } namespace keyboard { @@ -22,14 +19,12 @@ namespace keyboard { // Returns true if the virtual keyboard is enabled. KEYBOARD_EXPORT bool IsKeyboardEnabled(); -// Creates a ui::KeyEvent from the argument base::ListValue that is passed to -// the synthetic input APIs (either the Extension API or the WebUI API). The -// returned ui::KeyEvent is owned by the caller. If an error occurs, NULL is -// returned and |error| will be populated with a description of the error. For -// a description of the expected input, please see -// chrome/common/extensions/api/experimental_input_virtual_keyboard.json -KEYBOARD_EXPORT ui::KeyEvent* KeyEventFromArgs(const base::ListValue* args, - std::string* error); +// Insert |text| into the active TextInputClient associated with |root_window|, +// if there is one. Returns true if |text| was successfully inserted. Note +// that this may convert |text| into ui::KeyEvents for injection in some +// special circumstances (i.e. VKEY_RETURN, VKEY_BACK). +KEYBOARD_EXPORT bool InsertText(const base::string16& text, + aura::RootWindow* root_window); } // namespace keyboard |