diff options
author | azurewei <azurewei@chromium.org> | 2016-03-14 21:44:58 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-15 04:46:11 +0000 |
commit | b293444e8dbe567102fb82ab8831b4e7ac23a59a (patch) | |
tree | 37dd8f78dba12daa51ca5a42e5f95162af2b0c1f /chrome/common | |
parent | 1e78d13a2e71260ff29316004333b3482a5e5851 (diff) | |
download | chromium_src-b293444e8dbe567102fb82ab8831b4e7ac23a59a.zip chromium_src-b293444e8dbe567102fb82ab8831b4e7ac23a59a.tar.gz chromium_src-b293444e8dbe567102fb82ab8831b4e7ac23a59a.tar.bz2 |
Implement input.ime.sendKeyEvents API.
This cl implements input.ime.senKeyEvents API on Linux & Windows platform. The API calls the method InputMethodEngineBase::SendKeyEvents(), which contains the common code for ChromeOS/NonChromeOS. And the platform-specific codes are written in InputMethodEngine::SendKeyEvent().
On ChromeOS, the key event is dispatched from directly calling EventProcessor::OnEventFromSource(). While, On Linux & Windows, the key event is dispatched through ImeInputContextHandlerInterface::SendKeyEvent(), which will be implemented by InputMethodXxx.
This implementation is similar to input.ime.setComposition and input.ime.commitText APIs.
Add browser test in c/t/d/e/api_test/input_ime_nonchromeos/*.
BUG=517773
TEST=BrowserTest --gtest_filter=InputImeApiTest.*
Review URL: https://codereview.chromium.org/1771173002
Cr-Commit-Position: refs/heads/master@{#381175}
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/extensions/api/input_ime.json | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/common/extensions/api/input_ime.json b/chrome/common/extensions/api/input_ime.json index 0f981fc..4656903 100644 --- a/chrome/common/extensions/api/input_ime.json +++ b/chrome/common/extensions/api/input_ime.json @@ -269,7 +269,7 @@ "name": "sendKeyEvents", "type": "function", "description": "Sends the key events. This function is expected to be used by virtual keyboards. When key(s) on a virtual keyboard is pressed by a user, this function is used to propagate that event to the system.", - "platforms": ["chromeos"], + "platforms": ["chromeos", "win", "linux"], "parameters": [ { "name": "parameters", @@ -744,7 +744,7 @@ { "name": "onKeyEvent", "type": "function", - "description": "This event is sent if this extension owns the active IME.", + "description": "Fired when a key event is sent from the operating system. The event will be sent to the extension if this extension owns the active IME.", "platforms": ["chromeos", "win", "linux"], "options": { "supportsFilters": false, |