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

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

Issue 3640001: Refactored TTS extension code so that the platform-specific TTS... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2010 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 "chrome/browser/extensions/extension_tts_api.h"
6
7 #include "base/singleton.h"
8 #include "chrome/browser/chromeos/cros/cros_library.h"
9 #include "chrome/browser/chromeos/cros/speech_synthesis_library.h"
10
11 namespace util = extension_tts_api_util;
12
13 namespace {
14 const char kNotSupportedError[] =
15 "Native speech synthesis not supported on this platform.";
16 };
17
18 class ExtensionTtsPlatformImplLinux : public ExtensionTtsPlatformImpl {
19 public:
20 virtual bool Speak(
21 const std::string& utterance,
22 const std::string& language,
23 const std::string& gender,
24 double rate,
25 double pitch,
26 double volume) {
27 error_ = kNotSupportedError;
28 return false;
29 }
30
31 virtual bool StopSpeaking() {
32 error_ = kNotSupportedError;
33 return false;
34 }
35
36 virtual bool IsSpeaking() {
37 error_ = kNotSupportedError;
38 return false;
39 }
40
41 // Get the single instance of this class.
42 static ExtensionTtsPlatformImplLinux* GetInstance() {
43 return ExtensionTtsPlatformImplLinux::GetInstance();
44 }
45
46 private:
47 ExtensionTtsPlatformImplLinux() {}
48 virtual ~ExtensionTtsPlatformImplLinux() {}
49
50 friend struct DefaultSingletonTraits<ExtensionTtsPlatformImplLinux>;
51
52 DISALLOW_COPY_AND_ASSIGN(ExtensionTtsPlatformImplLinux);
53 };
54
55 // static
56 ExtensionTtsPlatformImpl* ExtensionTtsPlatformImpl::GetInstance() {
57 return ExtensionTtsPlatformImplLinux::GetInstance();
58 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_tts_api_gtk.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