Index: ui/keyboard/keyboard_util.h |
diff --git a/ui/keyboard/keyboard_util.h b/ui/keyboard/keyboard_util.h |
index 7d4643335c9ee4c802b36f6fb192e772d8712910..bb0edfb7bd7678c956f96ea2ad62a519f0e98805 100644 |
--- a/ui/keyboard/keyboard_util.h |
+++ b/ui/keyboard/keyboard_util.h |
@@ -29,7 +29,7 @@ enum CursorMoveDirection { |
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, |
@@ -41,7 +41,18 @@ KEYBOARD_EXPORT bool MoveCursor(int swipe_direction, |
int modifier_flags, |
aura::RootWindow* root_window); |
-// Get the list of keyboard resources. |size| is populated with the number of |
+// Sends a fabricated key event, where |type| is the event type, |key_value| |
+// is the unicode value of the character, |key_code| is the legacy key code |
+// value, and |shift_modifier| indicates if the shift key is being virtually |
+// pressed. The event is dispatched to the active TextInputClient associated |
+// with |root_window|. The type may be "keydown" or "keyup". |
+KEYBOARD_EXPORT bool SendKeyEvent(std::string type, |
+ int key_value, |
+ int key_code, |
+ bool shift_modifier, |
+ 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); |