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

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

Issue 1402463005: Reuse category flush when outputing live regions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698