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

Side by Side Diff: chrome/test/data/extensions/input_ime/main.js

Issue 47553010: Set focused TextInputType to the Ime extension (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 'use strict'; 4 'use strict';
5 5
6 /** 6 /**
7 * This class is a base class of each input method implementation. 7 * This class is a base class of each input method implementation.
8 * @constructor 8 * @constructor
9 */ 9 */
10 var IMEBase = function() {}; 10 var IMEBase = function() {};
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 131
132 /** 132 /**
133 * Called from chrome.input.ime.onFocus. 133 * Called from chrome.input.ime.onFocus.
134 * @private 134 * @private
135 * @this EngineBridge 135 * @this EngineBridge
136 **/ 136 **/
137 onFocus_: function(context) { 137 onFocus_: function(context) {
138 this.focusedContext_ = context; 138 this.focusedContext_ = context;
139 if (this.activeEngine_) 139 if (this.activeEngine_)
140 this.engineInstance_[this.activeEngine_].onFocus(context); 140 this.engineInstance_[this.activeEngine_].onFocus(context);
141 chrome.test.sendMessage('onFocus'); 141 chrome.test.sendMessage('onFocus:' + context.type);
142 }, 142 },
143 143
144 /** 144 /**
145 * Called from chrome.input.ime.onBlur. 145 * Called from chrome.input.ime.onBlur.
146 * @private 146 * @private
147 * @this EngineBridge 147 * @this EngineBridge
148 **/ 148 **/
149 onBlur_: function(contextID) { 149 onBlur_: function(contextID) {
150 if (this.activeEngine_) 150 if (this.activeEngine_)
151 this.engineInstance_[this.activeEngine_].onBlur(contextID); 151 this.engineInstance_[this.activeEngine_].onBlur(contextID);
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 chrome.input.ime.onReset.addListener(this.onReset_.bind(this)); 269 chrome.input.ime.onReset.addListener(this.onReset_.bind(this));
270 } 270 }
271 }; 271 };
272 272
273 var engineBridge = new EngineBridge(); 273 var engineBridge = new EngineBridge();
274 engineBridge.Initialize(); 274 engineBridge.Initialize();
275 engineBridge.addEngine('IdentityIME', new IdentityIME()); 275 engineBridge.addEngine('IdentityIME', new IdentityIME());
276 engineBridge.addEngine('ToUpperIME', new ToUpperIME()); 276 engineBridge.addEngine('ToUpperIME', new ToUpperIME());
277 engineBridge.addEngine('APIArgumentIME', new APIArgumentIME()); 277 engineBridge.addEngine('APIArgumentIME', new APIArgumentIME());
278 chrome.test.sendMessage('ReadyToUseImeEvent'); 278 chrome.test.sendMessage('ReadyToUseImeEvent');
OLDNEW
« chrome/common/extensions/api/input_ime.json ('K') | « chrome/common/extensions/api/input_ime.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698