Commit 2c1bb701 authored by dtseng's avatar dtseng Committed by Commit bot

Only send TTS VoicesChanged callbacks when TTS has been explicitly requested.

BUG=417106
TEST=none

Review URL: https://codereview.chromium.org/647343004

Cr-Commit-Position: refs/heads/master@{#299894}
parent 0298be9c
......@@ -437,6 +437,11 @@ int TtsControllerImpl::GetMatchingVoice(
}
void TtsControllerImpl::VoicesChanged() {
// Existence of platform tts indicates explicit requests to tts. Since
// |VoicesChanged| can occur implicitly, only send if needed.
if (!platform_impl_)
return;
for (std::set<VoicesChangedDelegate*>::iterator iter =
voices_changed_delegates_.begin();
iter != voices_changed_delegates_.end(); ++iter) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment