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

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

Issue 2550223002: Support basic stereo pan positioning for earcons (Closed)
Patch Set: Fix test. Created 4 years 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/next_earcons.js
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/next_earcons.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/next_earcons.js
index 9d2a6b4b25fc13bdea8fb336afe8d4e68072ba32..67cd71fea88c2316d8bb2366ceaa8e4ade9c3391 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/next_earcons.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/next_earcons.js
@@ -43,12 +43,18 @@ NextEarcons.prototype = {
/**
* @override
*/
- playEarcon: function(earcon) {
+ playEarcon: function(earcon, opt_location) {
if (!cvox.AbstractEarcons.enabled) {
return;
}
console.log('Earcon ' + earcon);
-
+ if (ChromeVoxState.instance.currentRange &&
+ ChromeVoxState.instance.currentRange.isValid()) {
+ var node = ChromeVoxState.instance.currentRange.start.node;
+ var rect = opt_location || node.location;
+ var container = node.root.location;
+ this.engine_.setPositionForRect(rect, container);
+ }
switch (earcon) {
case cvox.Earcon.ALERT_MODAL:
case cvox.Earcon.ALERT_NONMODAL:

Powered by Google App Engine
This is Rietveld 408576698