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

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

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 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 | « chrome/browser/speech/tts_controller_impl.cc ('k') | chrome/browser/speech/tts_mac.mm » ('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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 SPDConnection* conn_; 76 SPDConnection* conn_;
77 77
78 // These apply to the current utterance only. 78 // These apply to the current utterance only.
79 std::string utterance_; 79 std::string utterance_;
80 int utterance_id_; 80 int utterance_id_;
81 81
82 // Map a string composed of a voicename and module to the voicename. Used to 82 // Map a string composed of a voicename and module to the voicename. Used to
83 // uniquely identify a voice across all available modules. 83 // uniquely identify a voice across all available modules.
84 scoped_ptr<std::map<std::string, SPDChromeVoice> > all_native_voices_; 84 scoped_ptr<std::map<std::string, SPDChromeVoice> > all_native_voices_;
85 85
86 friend struct DefaultSingletonTraits<TtsPlatformImplLinux>; 86 friend struct base::DefaultSingletonTraits<TtsPlatformImplLinux>;
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) {
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 current_notification_ = state; 339 current_notification_ = state;
340 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, 340 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
341 base::Bind(&TtsPlatformImplLinux::OnSpeechEvent, 341 base::Bind(&TtsPlatformImplLinux::OnSpeechEvent,
342 base::Unretained(TtsPlatformImplLinux::GetInstance()), 342 base::Unretained(TtsPlatformImplLinux::GetInstance()),
343 state)); 343 state));
344 } 344 }
345 } 345 }
346 346
347 // static 347 // static
348 TtsPlatformImplLinux* TtsPlatformImplLinux::GetInstance() { 348 TtsPlatformImplLinux* TtsPlatformImplLinux::GetInstance() {
349 return Singleton<TtsPlatformImplLinux, 349 return base::Singleton<
350 LeakySingletonTraits<TtsPlatformImplLinux> >::get(); 350 TtsPlatformImplLinux,
351 base::LeakySingletonTraits<TtsPlatformImplLinux>>::get();
351 } 352 }
352 353
353 // static 354 // static
354 TtsPlatformImpl* TtsPlatformImpl::GetInstance() { 355 TtsPlatformImpl* TtsPlatformImpl::GetInstance() {
355 return TtsPlatformImplLinux::GetInstance(); 356 return TtsPlatformImplLinux::GetInstance();
356 } 357 }
OLDNEW
« no previous file with comments | « chrome/browser/speech/tts_controller_impl.cc ('k') | chrome/browser/speech/tts_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698