Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1038)

Unified Diff: ui/keyboard/keyboard_util.h

Issue 16972006: Insert text directly from the virtual keyboard. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix include Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/keyboard/keyboard_ui_handler.cc ('k') | ui/keyboard/keyboard_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/keyboard/keyboard_util.h
diff --git a/ui/keyboard/keyboard_util.h b/ui/keyboard/keyboard_util.h
index 0674fa12fe0c4d4c1120e1cf858d251a9c75719e..1245f9785534bb98ec452899939352b781b48472 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
« no previous file with comments | « ui/keyboard/keyboard_ui_handler.cc ('k') | ui/keyboard/keyboard_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698