| 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 |
| 11 goog.provide('cvox.ChromeVox'); | 11 goog.provide('cvox.ChromeVox'); |
| 12 | 12 |
| 13 // Forward declarations. | 13 // Forward declarations. |
| 14 // TODO (stoarca): Put these in a separate file and pass that | 14 // TODO (stoarca): Put these in a separate file and pass that |
| 15 // into the build system instead of having it here. This will allow | 15 // into the build system instead of having it here. This will allow |
| 16 // us to group all of the forward declarations for each file without | 16 // us to group all of the forward declarations for each file without |
| 17 // having them overwrite the mapping in deps.js | 17 // having them overwrite the mapping in deps.js |
| 18 goog.addDependency( | 18 goog.addDependency( |
| 19 '../host/interface/abstract_host.js', | 19 '../host/interface/abstract_host.js', ['cvox.AbstractHost'], []); |
| 20 ['cvox.AbstractHost'], | 20 |
| 21 goog.addDependency( |
| 22 '../host/interface/tts_interface.js', ['cvox.TtsInterface'], []); |
| 23 |
| 24 goog.addDependency( |
| 25 '../host/interface/braille_interface.js', ['cvox.BrailleInterface'], []); |
| 26 |
| 27 goog.addDependency( |
| 28 '../host/interface/mathjax_interface.js', ['cvox.MathJaxInterface'], []); |
| 29 |
| 30 goog.addDependency('../chromevox/messages/msgs.js', ['Msgs'], []); |
| 31 |
| 32 goog.addDependency( |
| 33 '../host/interface/abstract_earcons.js', ['cvox.AbstractEarcons'], []); |
| 34 |
| 35 goog.addDependency( |
| 36 '../chromevox/common/key_sequence.js', ['cvox.KeySequence'], []); |
| 37 |
| 38 goog.addDependency( |
| 39 '../chromevox/injected/navigation_manager.js', ['cvox.NavigationManager'], |
| 21 []); | 40 []); |
| 22 | 41 |
| 23 goog.addDependency( | 42 goog.addDependency( |
| 24 '../host/interface/tts_interface.js', | 43 '../chromevox/injected/serializer.js', ['cvox.Serializer'], []); |
| 25 ['cvox.TtsInterface'], | |
| 26 []); | |
| 27 | |
| 28 goog.addDependency( | |
| 29 '../host/interface/braille_interface.js', | |
| 30 ['cvox.BrailleInterface'], | |
| 31 []); | |
| 32 | |
| 33 goog.addDependency( | |
| 34 '../host/interface/mathjax_interface.js', | |
| 35 ['cvox.MathJaxInterface'], | |
| 36 []); | |
| 37 | |
| 38 goog.addDependency( | |
| 39 '../chromevox/messages/msgs.js', | |
| 40 ['Msgs'], | |
| 41 []); | |
| 42 | |
| 43 goog.addDependency( | |
| 44 '../host/interface/abstract_earcons.js', | |
| 45 ['cvox.AbstractEarcons'], | |
| 46 []); | |
| 47 | |
| 48 goog.addDependency( | |
| 49 '../chromevox/common/key_sequence.js', | |
| 50 ['cvox.KeySequence'], | |
| 51 []); | |
| 52 | |
| 53 goog.addDependency( | |
| 54 '../chromevox/injected/navigation_manager.js', | |
| 55 ['cvox.NavigationManager'], | |
| 56 []); | |
| 57 | |
| 58 goog.addDependency( | |
| 59 '../chromevox/injected/serializer.js', | |
| 60 ['cvox.Serializer'], | |
| 61 []); | |
| 62 | 44 |
| 63 // Constants | 45 // Constants |
| 64 /** | 46 /** |
| 65 * Constant for verbosity setting (cvox.ChromeVox.verbosity). | 47 * Constant for verbosity setting (cvox.ChromeVox.verbosity). |
| 66 * @const | 48 * @const |
| 67 * @type {number} | 49 * @type {number} |
| 68 */ | 50 */ |
| 69 cvox.VERBOSITY_VERBOSE = 0; | 51 cvox.VERBOSITY_VERBOSE = 0; |
| 70 /** | 52 /** |
| 71 * Constant for verbosity setting (cvox.ChromeVox.verbosity). | 53 * Constant for verbosity setting (cvox.ChromeVox.verbosity). |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 * there's no way to explicitly "un-mark". | 177 * there's no way to explicitly "un-mark". |
| 196 * @type {Function} | 178 * @type {Function} |
| 197 */ | 179 */ |
| 198 cvox.ChromeVox.markInUserCommand = function() {}; | 180 cvox.ChromeVox.markInUserCommand = function() {}; |
| 199 /** | 181 /** |
| 200 * Synchronizes ChromeVox's internal cursor to the targetNode. | 182 * Synchronizes ChromeVox's internal cursor to the targetNode. |
| 201 * @param {Node} targetNode The node that ChromeVox should be synced to. | 183 * @param {Node} targetNode The node that ChromeVox should be synced to. |
| 202 * @param {boolean=} speakNode If true, speaks out the node. | 184 * @param {boolean=} speakNode If true, speaks out the node. |
| 203 * @param {number=} opt_queueMode The queue mode to use for speaking. | 185 * @param {number=} opt_queueMode The queue mode to use for speaking. |
| 204 */ | 186 */ |
| 205 cvox.ChromeVox.syncToNode = function( | 187 cvox.ChromeVox.syncToNode = function(targetNode, speakNode, opt_queueMode) {}; |
| 206 targetNode, speakNode, opt_queueMode) {}; | |
| 207 | 188 |
| 208 /** | 189 /** |
| 209 * Provide a way for modules that can't depend on cvox.ChromeVoxUserCommands | 190 * Provide a way for modules that can't depend on cvox.ChromeVoxUserCommands |
| 210 * to execute commands. | 191 * to execute commands. |
| 211 * | 192 * |
| 212 * @param {string} commandName The command name as a string. | 193 * @param {string} commandName The command name as a string. |
| 213 */ | 194 */ |
| 214 cvox.ChromeVox.executeUserCommand = function(commandName) {}; | 195 cvox.ChromeVox.executeUserCommand = function(commandName) {}; |
| 215 | 196 |
| 216 /** | 197 /** |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 cvox.ChromeVox.documentHasFocus = function() { | 258 cvox.ChromeVox.documentHasFocus = function() { |
| 278 if (!document.hasFocus() || document.hidden) { | 259 if (!document.hasFocus() || document.hidden) { |
| 279 return false; | 260 return false; |
| 280 } | 261 } |
| 281 if (document.activeElement.tagName == 'IFRAME' || | 262 if (document.activeElement.tagName == 'IFRAME' || |
| 282 document.activeElement.tagName == 'WEBVIEW') { | 263 document.activeElement.tagName == 'WEBVIEW') { |
| 283 return false; | 264 return false; |
| 284 } | 265 } |
| 285 return true; | 266 return true; |
| 286 }; | 267 }; |
| OLD | NEW |