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

Side by Side Diff: chrome/browser/resources/keyboard/main.js

Issue 8570026: Rearrange the input APIs into more suitable groupings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code Review Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 /** 5 /**
6 * @fileoverview A simple virtual keyboard implementation. 6 * @fileoverview A simple virtual keyboard implementation.
7 */ 7 */
8 8
9 /** 9 /**
10 * The ratio of the row height to the font size. 10 * The ratio of the row height to the font size.
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 mainDiv.className = 'main'; 181 mainDiv.className = 'main';
182 mainDiv.id = 'main'; 182 mainDiv.id = 'main';
183 body.appendChild(mainDiv); 183 body.appendChild(mainDiv);
184 184
185 initIme(mainDiv); 185 initIme(mainDiv);
186 initKeyboard(currentKeyboardLayout, mainDiv); 186 initKeyboard(currentKeyboardLayout, mainDiv);
187 initPopupKeyboard(body); 187 initPopupKeyboard(body);
188 188
189 window.onhashchange(); 189 window.onhashchange();
190 190
191 chrome.experimental.input.onTextInputTypeChanged.addListener(function(type) { 191 chrome.experimental.input.virtualKeyboard.onTextInputTypeChanged.addListener(
192 function(type) {
192 var newMode = SHIFT_MODE; 193 var newMode = SHIFT_MODE;
193 switch(type) { 194 switch(type) {
194 case "text": 195 case "text":
195 newMode = SHIFT_MODE; 196 newMode = SHIFT_MODE;
196 break; 197 break;
197 case "email": 198 case "email":
198 case "password": 199 case "password":
199 case "search": 200 case "search":
200 case "url": 201 case "url":
201 newMode = KEY_MODE; 202 newMode = KEY_MODE;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 if (canvas !== undefined) { 243 if (canvas !== undefined) {
243 if (!visible) { 244 if (!visible) {
244 canvas.clear(); 245 canvas.clear();
245 } 246 }
246 } 247 }
247 if (visible) { 248 if (visible) {
248 window.onresize(); 249 window.onresize();
249 } 250 }
250 }); 251 });
251 } 252 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698