Chromium Code Reviews| 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 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 86 function(propertyName, increase) { | 86 function(propertyName, increase) { |
| 87 this.ttsEngines_.forEach(function(engine) { | 87 this.ttsEngines_.forEach(function(engine) { |
| 88 engine.increaseOrDecreaseProperty(propertyName, increase); | 88 engine.increaseOrDecreaseProperty(propertyName, increase); |
| 89 }); | 89 }); |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 | 92 |
| 93 /** | 93 /** |
| 94 * @override | 94 * @override |
| 95 */ | 95 */ |
| 96 cvox.CompositeTts.prototype.propertyToPercentage = function(property) { | |
| 97 for (var i = 0, engine; engine = this.ttsEngines_[i]; i++) { | |
| 98 var value = engine.propertyToPercentage(property); | |
| 99 if (value) { | |
|
David Tseng
2016/01/12 20:10:57
if (value !== undefined) or typeof(value) == 'numb
dmazzoni
2016/01/13 23:26:39
Done.
| |
| 100 return value; | |
| 101 } | |
| 102 } | |
| 103 }; | |
| 104 | |
| 105 | |
| 106 /** | |
| 107 * @override | |
| 108 */ | |
| 96 cvox.CompositeTts.prototype.getDefaultProperty = function(property) { | 109 cvox.CompositeTts.prototype.getDefaultProperty = function(property) { |
| 97 for (var i = 0, engine; engine = this.ttsEngines_[i]; i++) { | 110 for (var i = 0, engine; engine = this.ttsEngines_[i]; i++) { |
| 98 var value = engine.getDefaultProperty(property); | 111 var value = engine.getDefaultProperty(property); |
| 99 if (value) { | 112 if (value) { |
| 100 return value; | 113 return value; |
| 101 } | 114 } |
| 102 } | 115 } |
| 103 }; | 116 }; |
| OLD | NEW |