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

Unified Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js

Issue 1277183003: Add ChromeVox panel and implement caption display functionality. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Finish initial implementation for Chrome OS, address feedback Created 5 years, 1 month 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/cvox2/background/output.js
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
index 74949054871ed5bdc36edc7bf0d538d2217996ae..76e6e368fa33dfedcd11f58a3325f6622c37ae2a 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
@@ -11,6 +11,7 @@ goog.provide('Output.EventType');
goog.require('AutomationUtil.Dir');
goog.require('EarconEngine');
+goog.require('Panel');
goog.require('cursors.Cursor');
goog.require('cursors.Range');
goog.require('cursors.Unit');
@@ -708,6 +709,18 @@ Output.prototype = {
this.speechProperties_['endCallback'] = null;
cvox.ChromeVox.tts.speak(
buff.toString(), queueMode, this.speechProperties_);
+ if (queueMode == cvox.QueueMode.FLUSH)
+ (new PanelCommand(PanelCommandType.CLEAR_SPEECH)).send();
+ if (this.speechProperties_.relativePitch ==
+ cvox.AbstractTts.PERSONALITY_ANNOTATION.relativePitch) {
+ (new PanelCommand(
+ PanelCommandType.ADD_ANNOTATION_SPEECH,
+ buff.toString())).send();
+ } else {
+ (new PanelCommand(
+ PanelCommandType.ADD_NORMAL_SPEECH,
+ buff.toString())).send();
+ }
Peter Lundblad 2015/11/06 15:00:58 Why is this needed here in addition to background_
dmazzoni 2015/11/06 21:01:00 I was thinking we could provide more detailed info
queueMode = cvox.QueueMode.QUEUE;
}.bind(this));

Powered by Google App Engine
This is Rietveld 408576698