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

Unified Diff: ui/keyboard/keyboard_util.h

Issue 20145004: Switch from text insertion to key press and release events on the virtual k… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Formatting. Created 7 years, 5 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
Index: ui/keyboard/keyboard_util.h
diff --git a/ui/keyboard/keyboard_util.h b/ui/keyboard/keyboard_util.h
index 0fc60ff5d4b969ef51cfce45ef01368cd2b785c9..01dab0d0ec7dbeab976dc7f453d4092d0b3ead54 100644
--- a/ui/keyboard/keyboard_util.h
+++ b/ui/keyboard/keyboard_util.h
@@ -21,13 +21,21 @@ namespace keyboard {
KEYBOARD_EXPORT bool IsKeyboardEnabled();
// Insert |text| into the active TextInputClient associated with |root_window|,
-// if there is one. Returns true if |text| was successfully inserted. Note
+// 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);
-// Get the list of keyboard resources. |size| is populated with the number of
+// Dispatches a fabricated key event, where |type| is the event type, and
+// |char_code| is the unicode value of the character. The event is dispatched
+// to the active TextInputClient associated with |root_window|. The type may be
+// "keyPressed" or "keyReleased".
+KEYBOARD_EXPORT bool DispatchKeyEvent(std::string type,
+ int char_code,
+ aura::RootWindow* root_window);
+
+// Get the list of keyboard resources. |size| is populated with the number of
// resources in the returned array.
KEYBOARD_EXPORT const GritResourceMap* GetKeyboardExtensionResources(
size_t* size);

Powered by Google App Engine
This is Rietveld 408576698