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 The entry point for all ChromeVox2 related code for the | 6 * @fileoverview The entry point for all ChromeVox2 related code for the |
7 * background page. | 7 * background page. |
8 */ | 8 */ |
9 | 9 |
10 goog.provide('Background'); | 10 goog.provide('Background'); |
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
639 * cvox2.Output to prepend to the output. | 639 * cvox2.Output to prepend to the output. |
640 * @private | 640 * @private |
641 */ | 641 */ |
642 outputLiveRegionChange_: function(node, opt_prependFormatStr) { | 642 outputLiveRegionChange_: function(node, opt_prependFormatStr) { |
643 var range = cursors.Range.fromNode(node); | 643 var range = cursors.Range.fromNode(node); |
644 var output = new Output(); | 644 var output = new Output(); |
645 if (opt_prependFormatStr) { | 645 if (opt_prependFormatStr) { |
646 output.format(opt_prependFormatStr); | 646 output.format(opt_prependFormatStr); |
647 } | 647 } |
648 output.withSpeech(range, null, Output.EventType.NAVIGATE); | 648 output.withSpeech(range, null, Output.EventType.NAVIGATE); |
| 649 output.withSpeechCategory(cvox.TtsCategory.LIVE); |
649 output.go(); | 650 output.go(); |
650 }, | 651 }, |
651 | 652 |
652 /** | 653 /** |
653 * Returns true if the url should have Classic running. | 654 * Returns true if the url should have Classic running. |
654 * @return {boolean} | 655 * @return {boolean} |
655 * @private | 656 * @private |
656 */ | 657 */ |
657 shouldEnableClassicForUrl_: function(url) { | 658 shouldEnableClassicForUrl_: function(url) { |
658 return this.mode_ != ChromeVoxMode.FORCE_NEXT && | 659 return this.mode_ != ChromeVoxMode.FORCE_NEXT && |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
801 node.state.protected, | 802 node.state.protected, |
802 cvox.ChromeVox.tts); | 803 cvox.ChromeVox.tts); |
803 } | 804 } |
804 } | 805 } |
805 }; | 806 }; |
806 | 807 |
807 /** @type {Background} */ | 808 /** @type {Background} */ |
808 global.backgroundObj = new Background(); | 809 global.backgroundObj = new Background(); |
809 | 810 |
810 }); // goog.scope | 811 }); // goog.scope |
OLD | NEW |