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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/common/composite_tts.js

Issue 1696443002: Re-land: Implement ChromeVox Next menus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 A composite TTS sends allows ChromeVox to use 6 * @fileoverview A composite TTS sends allows ChromeVox to use
7 * multiple TTS engines at the same time. 7 * multiple TTS engines at the same time.
8 * 8 *
9 */ 9 */
10 10
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 function(propertyName, increase) { 87 function(propertyName, increase) {
88 this.ttsEngines_.forEach(function(engine) { 88 this.ttsEngines_.forEach(function(engine) {
89 engine.increaseOrDecreaseProperty(propertyName, increase); 89 engine.increaseOrDecreaseProperty(propertyName, increase);
90 }); 90 });
91 }; 91 };
92 92
93 93
94 /** 94 /**
95 * @override 95 * @override
96 */ 96 */
97 cvox.CompositeTts.prototype.propertyToPercentage = function(property) {
98 for (var i = 0, engine; engine = this.ttsEngines_[i]; i++) {
99 var value = engine.propertyToPercentage(property);
100 if (value !== undefined)
101 return value;
102 }
103 };
104
105
106 /**
107 * @override
108 */
97 cvox.CompositeTts.prototype.getDefaultProperty = function(property) { 109 cvox.CompositeTts.prototype.getDefaultProperty = function(property) {
98 for (var i = 0, engine; engine = this.ttsEngines_[i]; i++) { 110 for (var i = 0, engine; engine = this.ttsEngines_[i]; i++) {
99 var value = engine.getDefaultProperty(property); 111 var value = engine.getDefaultProperty(property);
100 if (value) { 112 if (value !== undefined)
101 return value; 113 return value;
102 }
103 } 114 }
104 return null; 115 return null;
105 }; 116 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698