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

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

Issue 14161009: WebUIHandler for chrome://keyboard (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix license headers Created 7 years, 8 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_util.cc ('k') | ui/keyboard/resources/index.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/keyboard/resources/common.js
diff --git a/ui/keyboard/resources/common.js b/ui/keyboard/resources/common.js
index 03aa5509362eff8ab1e37db8234e5084672ae39b..6f01910e4ff84252f58b06a716326d2c0dae786a 100644
--- a/ui/keyboard/resources/common.js
+++ b/ui/keyboard/resources/common.js
@@ -114,28 +114,15 @@ function transitionMode(transition) {
setMode(MODE_TRANSITIONS[currentMode + transition]);
}
-function logIfError() {
- if (chrome.runtime.lastError) {
- console.log(chrome.runtime.lastError);
- }
-}
-
/**
* Send the given key to chrome, via the experimental extension API.
* @param {string} keyIdentifier The key to send.
*/
function sendKey(keyIdentifier) {
- // FIXME(bryeung)
- console.log('Typed: ' + keyIdentifier);
var keyEvent = {
- type: 'keydown',
keyIdentifier: keyIdentifier
};
- chrome.experimental.input.virtualKeyboard.sendKeyboardEvent(keyEvent,
- logIfError);
- keyEvent.type = 'keyup';
- chrome.experimental.input.virtualKeyboard.sendKeyboardEvent(keyEvent,
- logIfError);
+ sendKeyEvent(keyEvent);
// Exit shift mode after pressing any key but space.
if (currentMode == SHIFT_MODE && keyIdentifier != 'Spacebar') {
« no previous file with comments | « ui/keyboard/keyboard_util.cc ('k') | ui/keyboard/resources/index.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698