OLD | NEW |
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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 87 |
88 DISALLOW_COPY_AND_ASSIGN(TtsPlatformImplLinux); | 88 DISALLOW_COPY_AND_ASSIGN(TtsPlatformImplLinux); |
89 }; | 89 }; |
90 | 90 |
91 // static | 91 // static |
92 SPDNotificationType TtsPlatformImplLinux::current_notification_ = | 92 SPDNotificationType TtsPlatformImplLinux::current_notification_ = |
93 SPD_EVENT_END; | 93 SPD_EVENT_END; |
94 | 94 |
95 TtsPlatformImplLinux::TtsPlatformImplLinux() | 95 TtsPlatformImplLinux::TtsPlatformImplLinux() |
96 : utterance_id_(0) { | 96 : utterance_id_(0) { |
97 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 97 const base::CommandLine& command_line = |
| 98 *base::CommandLine::ForCurrentProcess(); |
98 if (!command_line.HasSwitch(switches::kEnableSpeechDispatcher)) | 99 if (!command_line.HasSwitch(switches::kEnableSpeechDispatcher)) |
99 return; | 100 return; |
100 | 101 |
101 BrowserThread::PostTask(BrowserThread::FILE, | 102 BrowserThread::PostTask(BrowserThread::FILE, |
102 FROM_HERE, | 103 FROM_HERE, |
103 base::Bind(&TtsPlatformImplLinux::Initialize, | 104 base::Bind(&TtsPlatformImplLinux::Initialize, |
104 base::Unretained(this))); | 105 base::Unretained(this))); |
105 } | 106 } |
106 | 107 |
107 void TtsPlatformImplLinux::Initialize() { | 108 void TtsPlatformImplLinux::Initialize() { |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 // static | 343 // static |
343 TtsPlatformImplLinux* TtsPlatformImplLinux::GetInstance() { | 344 TtsPlatformImplLinux* TtsPlatformImplLinux::GetInstance() { |
344 return Singleton<TtsPlatformImplLinux, | 345 return Singleton<TtsPlatformImplLinux, |
345 LeakySingletonTraits<TtsPlatformImplLinux> >::get(); | 346 LeakySingletonTraits<TtsPlatformImplLinux> >::get(); |
346 } | 347 } |
347 | 348 |
348 // static | 349 // static |
349 TtsPlatformImpl* TtsPlatformImpl::GetInstance() { | 350 TtsPlatformImpl* TtsPlatformImpl::GetInstance() { |
350 return TtsPlatformImplLinux::GetInstance(); | 351 return TtsPlatformImplLinux::GetInstance(); |
351 } | 352 } |
OLD | NEW |