Cast: Stop logging kVideoFrameSentToEncoder and rename a couple events.
[chromium-blink-merge.git] / chrome / browser / speech / tts_chromeos.cc
blobe42cb0c546b4642050ddd73fc9df48d3ef7dd4fd
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/speech/tts_extension_loader_chromeos.h"
6 #include "chrome/browser/speech/tts_platform.h"
8 // Chrome OS doesn't have native TTS, instead it includes a built-in
9 // component extension that provides speech synthesis. This class includes
10 // an implementation of LoadBuiltInTtsExtension and dummy implementations of
11 // everything else.
12 class TtsPlatformImplChromeOs
13 : public TtsPlatformImpl {
14 public:
15 // TtsPlatformImpl overrides:
16 virtual bool PlatformImplAvailable() OVERRIDE {
17 return false;
20 virtual bool LoadBuiltInTtsExtension(Profile* profile) OVERRIDE {
21 return TtsExtensionLoaderChromeOs::GetInstance(profile)->LoadTtsExtension();
24 virtual bool Speak(
25 int utterance_id,
26 const std::string& utterance,
27 const std::string& lang,
28 const VoiceData& voice,
29 const UtteranceContinuousParameters& params) OVERRIDE {
30 return false;
33 virtual bool StopSpeaking() OVERRIDE {
34 return false;
37 virtual void Pause() OVERRIDE {}
39 virtual void Resume() OVERRIDE {}
41 virtual bool IsSpeaking() OVERRIDE {
42 return false;
45 virtual void GetVoices(std::vector<VoiceData>* out_voices) OVERRIDE {
48 // Get the single instance of this class.
49 static TtsPlatformImplChromeOs* GetInstance();
51 private:
52 TtsPlatformImplChromeOs() {}
53 virtual ~TtsPlatformImplChromeOs() {}
55 friend struct DefaultSingletonTraits<TtsPlatformImplChromeOs>;
57 DISALLOW_COPY_AND_ASSIGN(TtsPlatformImplChromeOs);
60 // static
61 TtsPlatformImpl* TtsPlatformImpl::GetInstance() {
62 return TtsPlatformImplChromeOs::GetInstance();
65 // static
66 TtsPlatformImplChromeOs*
67 TtsPlatformImplChromeOs::GetInstance() {
68 return Singleton<TtsPlatformImplChromeOs>::get();