Index: ui/keyboard/keyboard_util.h |
diff --git a/ui/keyboard/keyboard_util.h b/ui/keyboard/keyboard_util.h |
index 84510bf7b08296a6b96b5c1d12ce7aded1fbaefe..0674fa12fe0c4d4c1120e1cf858d251a9c75719e 100644 |
--- a/ui/keyboard/keyboard_util.h |
+++ b/ui/keyboard/keyboard_util.h |
@@ -5,13 +5,32 @@ |
#ifndef UI_KEYBOARD_KEYBOARD_UTIL_H_ |
#define UI_KEYBOARD_KEYBOARD_UTIL_H_ |
+#include <string> |
+ |
#include "ui/keyboard/keyboard_export.h" |
+namespace base { |
+class ListValue; |
+} |
+ |
+namespace ui { |
+class KeyEvent; |
+} |
+ |
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); |
+ |
} // namespace keyboard |
#endif // UI_KEYBOARD_KEYBOARD_UTIL_H_ |