Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: chrome/browser/extensions/extension_tts_api_linux.cc

Issue 9808024: Move TTS extension API to chrome/browser/speech/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix chromeos compile error, rebase Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 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.
4
5 #include "base/memory/singleton.h"
6 #include "chrome/browser/extensions/extension_tts_api_platform.h"
7
8 namespace {
9 const char kNotSupportedError[] =
10 "Native speech synthesis not supported on this platform.";
11 };
12
13 class ExtensionTtsPlatformImplLinux : public ExtensionTtsPlatformImpl {
14 public:
15 virtual bool PlatformImplAvailable() {
16 return false;
17 }
18
19 virtual bool Speak(
20 int utterance_id,
21 const std::string& utterance,
22 const std::string& lang,
23 const UtteranceContinuousParameters& params) {
24 error_ = kNotSupportedError;
25 return false;
26 }
27
28 virtual bool StopSpeaking() {
29 error_ = kNotSupportedError;
30 return false;
31 }
32
33 virtual bool IsSpeaking() {
34 error_ = kNotSupportedError;
35 return false;
36 }
37
38 virtual bool SendsEvent(TtsEventType event_type) {
39 return false;
40 }
41
42 // Get the single instance of this class.
43 static ExtensionTtsPlatformImplLinux* GetInstance() {
44 return Singleton<ExtensionTtsPlatformImplLinux>::get();
45 }
46
47 private:
48 ExtensionTtsPlatformImplLinux() {}
49 virtual ~ExtensionTtsPlatformImplLinux() {}
50
51 friend struct DefaultSingletonTraits<ExtensionTtsPlatformImplLinux>;
52
53 DISALLOW_COPY_AND_ASSIGN(ExtensionTtsPlatformImplLinux);
54 };
55
56 // static
57 ExtensionTtsPlatformImpl* ExtensionTtsPlatformImpl::GetInstance() {
58 return ExtensionTtsPlatformImplLinux::GetInstance();
59 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_tts_api_controller_unittest.cc ('k') | chrome/browser/extensions/extension_tts_api_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698