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

Side by Side Diff: ui/keyboard/resources/webui/api_adapter.js

Issue 26258003: Add a full QWERTY layout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix edge case in WebUI Created 7 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 function insertText(text) { 5 function insertText(text) {
6 chrome.send('insertText', [ text ]); 6 chrome.send('insertText', [ text ]);
7 } 7 }
8 8
9 function sendKeyEvent(event) { 9 function sendKeyEvent(event) {
10 chrome.send('sendKeyEvent', [ event ]); 10 chrome.send('sendKeyEvent', [ event ]);
(...skipping 16 matching lines...) Expand all
27 */ 27 */
28 var requestId = 0; 28 var requestId = 0;
29 29
30 /** 30 /**
31 * Called when a text input box gets focus. 31 * Called when a text input box gets focus.
32 * @param {object} inputContext Describes an input context. It only contains 32 * @param {object} inputContext Describes an input context. It only contains
33 * the type of text input box at present and only "password", "number" and 33 * the type of text input box at present and only "password", "number" and
34 * "text" are supported. 34 * "text" are supported.
35 */ 35 */
36 function OnTextInputBoxFocused(inputContext) { 36 function OnTextInputBoxFocused(inputContext) {
37 keyboard.inputType = inputContext.type; 37 // Do not want to use the system keyboard for passwords in webui.
38 if (inputContext.type == 'password')
39 inputContext.type = 'text';
40 keyboard.inputTypeValue = inputContext.type;
38 } 41 }
39 42
40 /** 43 /**
41 * Gets the context of the focused input field. The context is returned as a 44 * Gets the context of the focused input field. The context is returned as a
42 * paramter in the |callback|. 45 * paramter in the |callback|.
43 * @param {function(Object)} callback The callback function after the webui 46 * @param {function(Object)} callback The callback function after the webui
44 * function finished. 47 * function finished.
45 * @return {number} The ID of the new request. 48 * @return {number} The ID of the new request.
46 */ 49 */
47 function GetInputContext(callback) { 50 function GetInputContext(callback) {
(...skipping 25 matching lines...) Expand all
73 if (!requestIdCallbackMap[requestId]) 76 if (!requestIdCallbackMap[requestId])
74 return; 77 return;
75 requestIdCallbackMap[requestId](inputContext); 78 requestIdCallbackMap[requestId](inputContext);
76 } 79 }
77 80
78 exports.OnTextInputBoxFocused = OnTextInputBoxFocused; 81 exports.OnTextInputBoxFocused = OnTextInputBoxFocused;
79 exports.getInputContext = GetInputContext; 82 exports.getInputContext = GetInputContext;
80 exports.cancelRequest = CancelRequest; 83 exports.cancelRequest = CancelRequest;
81 exports.GetInputContextCallback = GetInputContextCallback; 84 exports.GetInputContextCallback = GetInputContextCallback;
82 })(this); 85 })(this);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698