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

Side by Side Diff: third_party/google_input_tools/src/chrome/os/env.js

Issue 1576613002: Update Google Input Tools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing APIs, remove bade dependencies. Created 4 years, 10 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 2015 The ChromeOS IME Authors. All Rights Reserved. 1 // Copyright 2015 The ChromeOS IME Authors. All Rights Reserved.
2 // limitations under the License. 2 // limitations under the License.
3 // See the License for the specific language governing permissions and 3 // See the License for the specific language governing permissions and
4 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5 // distributed under the License is distributed on an "AS-IS" BASIS, 5 // distributed under the License is distributed on an "AS-IS" BASIS,
6 // Unless required by applicable law or agreed to in writing, software 6 // Unless required by applicable law or agreed to in writing, software
7 // 7 //
8 // http://www.apache.org/licenses/LICENSE-2.0 8 // http://www.apache.org/licenses/LICENSE-2.0
9 // 9 //
10 // You may obtain a copy of the License at 10 // You may obtain a copy of the License at
11 // you may not use this file except in compliance with the License. 11 // you may not use this file except in compliance with the License.
12 // Licensed under the Apache License, Version 2.0 (the "License"); 12 // Licensed under the Apache License, Version 2.0 (the "License");
13 // 13 //
14 goog.provide('i18n.input.chrome.Env'); 14 goog.provide('i18n.input.chrome.Env');
15 15
16 goog.require('goog.array'); 16 goog.require('goog.array');
17 goog.require('i18n.input.chrome.Constant'); 17 goog.require('i18n.input.chrome.Constant');
18 goog.require('i18n.input.chrome.inputview.FeatureTracker'); 18 goog.require('i18n.input.chrome.FeatureTracker');
19 goog.require('i18n.input.lang.InputTool'); 19 goog.require('i18n.input.lang.InputTool');
20 goog.require('i18n.input.lang.InputToolType'); 20 goog.require('i18n.input.lang.InputToolType');
21 21
22 goog.scope(function() { 22 goog.scope(function() {
23 var Constant = i18n.input.chrome.Constant; 23 var Constant = i18n.input.chrome.Constant;
24 var FeatureTracker = i18n.input.chrome.inputview.FeatureTracker; 24 var FeatureTracker = i18n.input.chrome.FeatureTracker;
25 var InputTool = i18n.input.lang.InputTool; 25 var InputTool = i18n.input.lang.InputTool;
26 var InputToolType = i18n.input.lang.InputToolType; 26 var InputToolType = i18n.input.lang.InputToolType;
27 27
28 28
29 29
30 /** 30 /**
31 * The Environment class which holds some status' of ChromeOS for input methods. 31 * The Environment class which holds some status' of ChromeOS for input methods.
32 * e.g. the current input field context, the current input method engine ID, 32 * e.g. the current input field context, the current input method engine ID,
33 * the flags, etc. 33 * the flags, etc.
34 * 34 *
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 98
99 /** @type {boolean} */ 99 /** @type {boolean} */
100 Env.prototype.isPhysicalKeyboardAutocorrectEnabled = false; 100 Env.prototype.isPhysicalKeyboardAutocorrectEnabled = false;
101 101
102 102
103 /** @type {string} */ 103 /** @type {string} */
104 Env.prototype.textBeforeCursor = ''; 104 Env.prototype.textBeforeCursor = '';
105 105
106 106
107 /** @type {Object.<{text: string, focus: number, anchor: number}>} */ 107 /**
108 * @type {Object.<{text: string, focus: number, anchor: number,
109 * offset: number}>}
110 */
108 Env.prototype.surroundingInfo = null; 111 Env.prototype.surroundingInfo = null;
109 112
110 113
111 /** @type {boolean} */ 114 /** @type {boolean} */
112 Env.prototype.isChromeVoxOn = false; 115 Env.prototype.isChromeVoxOn = false;
113 116
114 117
115 /** @type {boolean} */ 118 /** @type {boolean} */
116 Env.prototype.isOnScreenKeyboardShown = false; 119 Env.prototype.isOnScreenKeyboardShown = false;
117 120
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 * 162 *
160 * @param {string} xkbEngineId The XKB engine Id. 163 * @param {string} xkbEngineId The XKB engine Id.
161 * @return {boolean} supported or not. 164 * @return {boolean} supported or not.
162 */ 165 */
163 Env.isXkbAndNaclEnabled = function(xkbEngineId) { 166 Env.isXkbAndNaclEnabled = function(xkbEngineId) {
164 var inputTool = InputTool.get(xkbEngineId); 167 var inputTool = InputTool.get(xkbEngineId);
165 return !!inputTool && inputTool.type == InputToolType.XKB && 168 return !!inputTool && inputTool.type == InputToolType.XKB &&
166 goog.array.contains(Constant.NACL_LANGUAGES, inputTool.languageCode); 169 goog.array.contains(Constant.NACL_LANGUAGES, inputTool.languageCode);
167 }; 170 };
168 }); // goog.scope 171 }); // goog.scope
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698