OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |