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

Unified Diff: ui/keyboard/resources/api_adapter.js

Issue 15176004: Web Component Virtual Keyboard (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 7 years, 7 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_controller.cc ('k') | ui/keyboard/resources/common.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/keyboard/resources/api_adapter.js
diff --git a/ui/keyboard/resources/api_adapter.js b/ui/keyboard/resources/api_adapter.js
index 1f69be47551f5903067af048a573fb21ad0cc018..315387f2a9d47219c574eaa08e0ad5ab2a39ea89 100644
--- a/ui/keyboard/resources/api_adapter.js
+++ b/ui/keyboard/resources/api_adapter.js
@@ -8,7 +8,18 @@ function logIfError() {
}
}
-function sendKeyEvent(keyEvent) {
+function sendKey(key) {
+ var keyIdentifier = key;
+
+ // Fix up some keys to their respective identifiers for convenience.
+ if (keyIdentifier == ' ') {
+ keyIdentifier = 'Spacebar';
bryeung 2013/05/29 17:16:06 this kind of logic doesn't belong in the adapter,
bshe 2013/05/29 18:34:48 doh. You are right. I forget about webui version.
+ }
+
+ var keyEvent = {
+ keyIdentifier: keyIdentifier
+ };
+
keyEvent.type = 'keydown';
chrome.experimental.input.virtualKeyboard.sendKeyboardEvent(keyEvent,
logIfError);
« no previous file with comments | « ui/keyboard/keyboard_ui_controller.cc ('k') | ui/keyboard/resources/common.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698