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

Side by Side Diff: chrome/browser/speech/tts_linux.cc

Issue 591043002: Remove enable-speech-dispatcher flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/ui/startup/bad_flags_prompt.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <math.h> 5 #include <math.h>
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/leak_annotations.h" 10 #include "base/debug/leak_annotations.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 DISALLOW_COPY_AND_ASSIGN(TtsPlatformImplLinux); 89 DISALLOW_COPY_AND_ASSIGN(TtsPlatformImplLinux);
90 }; 90 };
91 91
92 // static 92 // static
93 SPDNotificationType TtsPlatformImplLinux::current_notification_ = 93 SPDNotificationType TtsPlatformImplLinux::current_notification_ =
94 SPD_EVENT_END; 94 SPD_EVENT_END;
95 95
96 TtsPlatformImplLinux::TtsPlatformImplLinux() 96 TtsPlatformImplLinux::TtsPlatformImplLinux()
97 : utterance_id_(0) { 97 : utterance_id_(0) {
98 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
99 if (!command_line.HasSwitch(switches::kEnableSpeechDispatcher))
100 return;
101
102 BrowserThread::PostTask(BrowserThread::FILE, 98 BrowserThread::PostTask(BrowserThread::FILE,
103 FROM_HERE, 99 FROM_HERE,
104 base::Bind(&TtsPlatformImplLinux::Initialize, 100 base::Bind(&TtsPlatformImplLinux::Initialize,
105 base::Unretained(this))); 101 base::Unretained(this)));
106 } 102 }
107 103
108 void TtsPlatformImplLinux::Initialize() { 104 void TtsPlatformImplLinux::Initialize() {
109 base::AutoLock lock(initialization_lock_); 105 base::AutoLock lock(initialization_lock_);
110 106
111 if (!libspeechd_loader_.Load("libspeechd.so.2")) 107 if (!libspeechd_loader_.Load("libspeechd.so.2"))
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 // static 339 // static
344 TtsPlatformImplLinux* TtsPlatformImplLinux::GetInstance() { 340 TtsPlatformImplLinux* TtsPlatformImplLinux::GetInstance() {
345 return Singleton<TtsPlatformImplLinux, 341 return Singleton<TtsPlatformImplLinux,
346 LeakySingletonTraits<TtsPlatformImplLinux> >::get(); 342 LeakySingletonTraits<TtsPlatformImplLinux> >::get();
347 } 343 }
348 344
349 // static 345 // static
350 TtsPlatformImpl* TtsPlatformImpl::GetInstance() { 346 TtsPlatformImpl* TtsPlatformImpl::GetInstance() {
351 return TtsPlatformImplLinux::GetInstance(); 347 return TtsPlatformImplLinux::GetInstance();
352 } 348 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/startup/bad_flags_prompt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698