blob: 799d45e2c5c8f9d096beecaeedafd586fe9d338b [file] [log] [blame]
// Copyright (c) 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/macros.h"
#include "content/public/browser/tts_platform.h"
// This class includes extension-based tts through LoadBuiltInTtsExtension and
// native tts through ARC.
class TtsPlatformImplChromeOs : public content::TtsPlatform {
// TtsPlatform overrides:
bool PlatformImplAvailable() override;
bool LoadBuiltInTtsEngine(content::BrowserContext* browser_context) override;
bool Speak(int utterance_id,
const std::string& utterance,
const std::string& lang,
const content::VoiceData& voice,
const content::UtteranceContinuousParameters& params) override;
bool StopSpeaking() override;
void GetVoices(std::vector<content::VoiceData>* out_voices) override;
std::string GetError() override;
void ClearError() override;
void SetError(const std::string& error) override;
bool IsSpeaking() override;
// Unimplemented.
void Pause() override {}
void Resume() override {}
void WillSpeakUtteranceWithVoice(
const content::TtsUtterance* utterance,
const content::VoiceData& voice_data) override {}
// Get the single instance of this class.
static TtsPlatformImplChromeOs* GetInstance();
TtsPlatformImplChromeOs() {}
virtual ~TtsPlatformImplChromeOs() {}
friend struct base::DefaultSingletonTraits<TtsPlatformImplChromeOs>;
std::string error_;