Commit 1a1f23e1 authored by David Tseng's avatar David Tseng Committed by Commit Bot

Load built in tts engine when launching tts settings page

We are typically extremely conservative when loading the built in tts engine. The only codepath we do this before was in TtsControllerImpl, in response to a speak call.

This change enables loading immediately after the tts settings page registers js message handlers in C++, where a non-null profile is available.

Test: on a fresh profile, navigate to settings -> accessibility ->  tts -> Google tts engine settings. Verify all voices show up.
Change-Id: Id2294f25f034da0a254d904c1325e0d8ba274d21
Reviewed-on: https://chromium-review.googlesource.com/1120948Reviewed-by: default avatarHector Carmona <hcarmona@chromium.org>
Commit-Queue: David Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572091}
parent ddedf9e5
......@@ -30,6 +30,9 @@ void TtsHandler::HandleGetAllTtsVoiceData(const base::ListValue* args) {
}
void TtsHandler::HandleGetTtsExtensions(const base::ListValue* args) {
// Ensure the built in tts engine is loaded to be able to respond to messages.
TtsExtensionEngine::GetInstance()->LoadBuiltInTtsExtension(
Profile::FromWebUI(web_ui()));
base::ListValue responses;
Profile* profile = Profile::FromWebUI(web_ui());
extensions::ExtensionRegistry* registry =
......
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