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

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

Issue 1273363004: Initial commit of new ChromeVox earcon engine. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 unified diff | Download patch
OLDNEW
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 Provides output services for ChromeVox. 6 * @fileoverview Provides output services for ChromeVox.
7 */ 7 */
8 8
9 goog.provide('Output'); 9 goog.provide('Output');
10 goog.provide('Output.EventType'); 10 goog.provide('Output.EventType');
11 11
12 goog.require('AutomationUtil.Dir'); 12 goog.require('AutomationUtil.Dir');
13 goog.require('cursors.Cursor'); 13 goog.require('cursors.Cursor');
14 goog.require('cursors.Range'); 14 goog.require('cursors.Range');
15 goog.require('cursors.Unit'); 15 goog.require('cursors.Unit');
16 goog.require('cvox.AbstractEarcons'); 16 goog.require('cvox.AbstractEarcons');
17 goog.require('EarconEngine');
17 goog.require('cvox.NavBraille'); 18 goog.require('cvox.NavBraille');
18 goog.require('cvox.Spannable'); 19 goog.require('cvox.Spannable');
19 goog.require('cvox.ValueSelectionSpan'); 20 goog.require('cvox.ValueSelectionSpan');
20 goog.require('cvox.ValueSpan'); 21 goog.require('cvox.ValueSpan');
21 goog.require('goog.i18n.MessageFormat'); 22 goog.require('goog.i18n.MessageFormat');
22 23
23 goog.scope(function() { 24 goog.scope(function() {
24 var Dir = AutomationUtil.Dir; 25 var Dir = AutomationUtil.Dir;
25 26
26 /** 27 /**
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 Output.Action.call(this); 517 Output.Action.call(this);
517 /** @type {string} */ 518 /** @type {string} */
518 this.earconId = earconId; 519 this.earconId = earconId;
519 }; 520 };
520 521
521 Output.EarconAction.prototype = { 522 Output.EarconAction.prototype = {
522 __proto__: Output.Action.prototype, 523 __proto__: Output.Action.prototype,
523 524
524 /** @override */ 525 /** @override */
525 run: function() { 526 run: function() {
527 // TODO: use the new EarconEngine here.
528
526 cvox.ChromeVox.earcons.playEarcon(cvox.AbstractEarcons[this.earconId]); 529 cvox.ChromeVox.earcons.playEarcon(cvox.AbstractEarcons[this.earconId]);
527 } 530 }
528 }; 531 };
529 532
530 /** 533 /**
531 * Annotation for selection. 534 * Annotation for selection.
532 * @param {number} startIndex 535 * @param {number} startIndex
533 * @param {number} endIndex 536 * @param {number} endIndex
534 * @constructor 537 * @constructor
535 */ 538 */
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
1220 return this.brailleBuffer_.reduce(function(prev, cur) { 1223 return this.brailleBuffer_.reduce(function(prev, cur) {
1221 if (prev.getLength() > 0 && cur.getLength() > 0) 1224 if (prev.getLength() > 0 && cur.getLength() > 0)
1222 prev.append(Output.SPACE); 1225 prev.append(Output.SPACE);
1223 prev.append(cur); 1226 prev.append(cur);
1224 return prev; 1227 return prev;
1225 }, new cvox.Spannable()); 1228 }, new cvox.Spannable());
1226 } 1229 }
1227 }; 1230 };
1228 1231
1229 }); // goog.scope 1232 }); // goog.scope
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698