Chromium Code Reviews| Index: chrome/browser/resources/chromeos/chromevox/chromevox/injected/api_implementation.js |
| diff --git a/chrome/browser/resources/chromeos/chromevox/chromevox/injected/api_implementation.js b/chrome/browser/resources/chromeos/chromevox/chromevox/injected/api_implementation.js |
| index 2c011d49cabde71b4d4e526fa346129a9116298e..3517a486b75948e3932026bbbf017f37972d3ce6 100644 |
| --- a/chrome/browser/resources/chromeos/chromevox/chromevox/injected/api_implementation.js |
| +++ b/chrome/browser/resources/chromeos/chromevox/chromevox/injected/api_implementation.js |
| @@ -143,7 +143,9 @@ cvox.ApiImplementation.speak = function( |
| properties = {}; |
| } |
| setupEndCallback_(properties, callbackId); |
| - cvox.ChromeVox.tts.speak(textString, queueMode, properties); |
| + cvox.ChromeVox.tts.speak(textString, |
| + /** @type {cvox.QueueMode} */ (queueMode), |
| + properties); |
| } |
| }; |
| @@ -158,7 +160,7 @@ cvox.ApiImplementation.speakNode = function(node, queueMode, properties) { |
| if (cvox.ChromeVox.isActive) { |
| cvox.ChromeVox.tts.speak( |
| cvox.DomUtil.getName(node), |
| - queueMode, |
| + /** @type {cvox.QueueMode} */ (queueMode), |
| properties); |
| } |
| }; |
| @@ -261,7 +263,7 @@ cvox.ApiImplementation.syncToNode = function( |
| } |
| if (opt_queueMode == undefined) { |
|
Peter Lundblad
2014/09/29 13:51:03
Do you think it is safe to fix this == to a === wh
dmazzoni
2014/09/30 22:01:19
Hmmm, I'd prefer to make sure we handle "null" cor
|
| - opt_queueMode = cvox.AbstractTts.QUEUE_MODE_CATEGORY_FLUSH; |
| + opt_queueMode = cvox.QueueMode.CATEGORY_FLUSH; |
| } |
| cvox.ChromeVox.navigationManager.updateSelToArbitraryNode(targetNode, true); |
| @@ -279,7 +281,7 @@ cvox.ApiImplementation.syncToNode = function( |
| if (opt_speakNode) { |
| cvox.ChromeVox.navigationManager.speakDescriptionArray( |
| cvox.ApiImplementation.getDesc_(targetNode), |
| - opt_queueMode, |
| + /** @type {cvox.QueueMode} */ (opt_queueMode), |
| null, |
| null, |
| 'nav'); |