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

Unified Diff: chrome/browser/resources/chromeos/chromevox/chromevox/injected/api_implementation.js

Issue 604423002: Use an enum for ChromeVox queue mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
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 eee5db6f81ebd13fe54fc6b7e834780bad387763..0db02e9e250576973ee7771a2e40fd9dc29d1bfb 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) {
- 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,
cvox.TtsCategory.NAV);

Powered by Google App Engine
This is Rietveld 408576698