OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 Defines a global object. The initialization of this | 6 * @fileoverview Defines a global object. The initialization of this |
7 * object happens in init.js. | 7 * object happens in init.js. |
8 * | 8 * |
9 */ | 9 */ |
10 | 10 |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 * See: cvox.VERBOSITY_VERBOSE and cvox.VERBOSITY_BRIEF | 143 * See: cvox.VERBOSITY_VERBOSE and cvox.VERBOSITY_BRIEF |
144 * @type {number} | 144 * @type {number} |
145 */ | 145 */ |
146 cvox.ChromeVox.verbosity = cvox.VERBOSITY_VERBOSE; | 146 cvox.ChromeVox.verbosity = cvox.VERBOSITY_VERBOSE; |
147 /** | 147 /** |
148 * @type {number} | 148 * @type {number} |
149 */ | 149 */ |
150 cvox.ChromeVox.typingEcho = 0; | 150 cvox.ChromeVox.typingEcho = 0; |
151 /** | 151 /** |
152 * Echoing on key press events. | 152 * Echoing on key press events. |
153 * @type {Object.<string, boolean>} | 153 * @type {Object<string, boolean>} |
154 */ | 154 */ |
155 cvox.ChromeVox.keyEcho = {}; | 155 cvox.ChromeVox.keyEcho = {}; |
156 /** | 156 /** |
157 * @type {Object.<string, {x:number, y:number}>} | 157 * @type {Object<string, {x:number, y:number}>} |
158 */ | 158 */ |
159 cvox.ChromeVox.position = {}; | 159 cvox.ChromeVox.position = {}; |
160 /** | 160 /** |
161 * @type {boolean} | 161 * @type {boolean} |
162 */ | 162 */ |
163 cvox.ChromeVox.isChromeOS = navigator.userAgent.indexOf('CrOS') != -1; | 163 cvox.ChromeVox.isChromeOS = navigator.userAgent.indexOf('CrOS') != -1; |
164 /** | 164 /** |
165 * @type {boolean} | 165 * @type {boolean} |
166 */ | 166 */ |
167 cvox.ChromeVox.isMac = navigator.platform.indexOf('Mac') != -1; | 167 cvox.ChromeVox.isMac = navigator.platform.indexOf('Mac') != -1; |
168 /** | 168 /** |
169 * @type {string} | 169 * @type {string} |
170 */ | 170 */ |
171 cvox.ChromeVox.modKeyStr; | 171 cvox.ChromeVox.modKeyStr; |
172 if (cvox.ChromeVox.isChromeOS) { | 172 if (cvox.ChromeVox.isChromeOS) { |
173 cvox.ChromeVox.modKeyStr = 'Shift+Search'; | 173 cvox.ChromeVox.modKeyStr = 'Shift+Search'; |
174 } else if (cvox.ChromeVox.isMac) { | 174 } else if (cvox.ChromeVox.isMac) { |
175 cvox.ChromeVox.modKeyStr = 'Ctrl+Cmd'; | 175 cvox.ChromeVox.modKeyStr = 'Ctrl+Cmd'; |
176 } else { | 176 } else { |
177 cvox.ChromeVox.modKeyStr = 'Shift+Alt'; | 177 cvox.ChromeVox.modKeyStr = 'Shift+Alt'; |
178 } | 178 } |
179 /** | 179 /** |
180 * If any of these keys is pressed with the modifier key, we go in sequence mode | 180 * If any of these keys is pressed with the modifier key, we go in sequence mode |
181 * where the subsequent independent key downs (while modifier keys are down) | 181 * where the subsequent independent key downs (while modifier keys are down) |
182 * are a part of the same shortcut. This array is populated in | 182 * are a part of the same shortcut. This array is populated in |
183 * cvox.ChromeVoxKbHandler.loadKeyToFunctionsTable(). | 183 * cvox.ChromeVoxKbHandler.loadKeyToFunctionsTable(). |
184 * @type {!Array.<cvox.KeySequence>} | 184 * @type {!Array<cvox.KeySequence>} |
185 */ | 185 */ |
186 cvox.ChromeVox.sequenceSwitchKeyCodes = []; | 186 cvox.ChromeVox.sequenceSwitchKeyCodes = []; |
187 /** @type {Object.<string, boolean>} */ | 187 /** @type {Object<string, boolean>} */ |
188 cvox.ChromeVox.visitedUrls = {}; | 188 cvox.ChromeVox.visitedUrls = {}; |
189 /** | 189 /** |
190 * This function can be called before doing an operation that may trigger | 190 * This function can be called before doing an operation that may trigger |
191 * focus events and other events that would normally be announced. This | 191 * focus events and other events that would normally be announced. This |
192 * tells the event manager that these events should be ignored, they're | 192 * tells the event manager that these events should be ignored, they're |
193 * a result of another command that's already announced them. This is | 193 * a result of another command that's already announced them. This is |
194 * a temporary state that's automatically reverted after a few milliseconds, | 194 * a temporary state that's automatically reverted after a few milliseconds, |
195 * there's no way to explicitly "un-mark". | 195 * there's no way to explicitly "un-mark". |
196 * @type {Function} | 196 * @type {Function} |
197 */ | 197 */ |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 * @return {HTMLElement} with the id. | 268 * @return {HTMLElement} with the id. |
269 */ | 269 */ |
270 function $(id) { | 270 function $(id) { |
271 return document.getElementById(id); | 271 return document.getElementById(id); |
272 } | 272 } |
273 | 273 |
274 /** | 274 /** |
275 * @param {Array} tabs | 275 * @param {Array} tabs |
276 */ | 276 */ |
277 cvox.ChromeVox.injectChromeVoxIntoTabs = function(tabs) {}; | 277 cvox.ChromeVox.injectChromeVoxIntoTabs = function(tabs) {}; |
OLD | NEW |