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

Side by Side Diff: chrome/browser/speech/extension_api/tts_extension_api.cc

Issue 399493002: Remove many instances of CreateBooleanValue. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 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
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 "chrome/browser/speech/extension_api/tts_extension_api.h" 5 #include "chrome/browser/speech/extension_api/tts_extension_api.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 TtsController::GetInstance()->Pause(); 295 TtsController::GetInstance()->Pause();
296 return true; 296 return true;
297 } 297 }
298 298
299 bool TtsResumeFunction::RunSync() { 299 bool TtsResumeFunction::RunSync() {
300 TtsController::GetInstance()->Resume(); 300 TtsController::GetInstance()->Resume();
301 return true; 301 return true;
302 } 302 }
303 303
304 bool TtsIsSpeakingFunction::RunSync() { 304 bool TtsIsSpeakingFunction::RunSync() {
305 SetResult(base::Value::CreateBooleanValue( 305 SetResult(
306 TtsController::GetInstance()->IsSpeaking())); 306 new base::FundamentalValue(TtsController::GetInstance()->IsSpeaking()));
307 return true; 307 return true;
308 } 308 }
309 309
310 bool TtsGetVoicesFunction::RunSync() { 310 bool TtsGetVoicesFunction::RunSync() {
311 std::vector<VoiceData> voices; 311 std::vector<VoiceData> voices;
312 TtsController::GetInstance()->GetVoices(GetProfile(), &voices); 312 TtsController::GetInstance()->GetVoices(GetProfile(), &voices);
313 313
314 scoped_ptr<base::ListValue> result_voices(new base::ListValue()); 314 scoped_ptr<base::ListValue> result_voices(new base::ListValue());
315 for (size_t i = 0; i < voices.size(); ++i) { 315 for (size_t i = 0; i < voices.size(); ++i) {
316 const VoiceData& voice = voices[i]; 316 const VoiceData& voice = voices[i];
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 } 360 }
361 361
362 static base::LazyInstance<BrowserContextKeyedAPIFactory<TtsAPI> > g_factory = 362 static base::LazyInstance<BrowserContextKeyedAPIFactory<TtsAPI> > g_factory =
363 LAZY_INSTANCE_INITIALIZER; 363 LAZY_INSTANCE_INITIALIZER;
364 364
365 BrowserContextKeyedAPIFactory<TtsAPI>* TtsAPI::GetFactoryInstance() { 365 BrowserContextKeyedAPIFactory<TtsAPI>* TtsAPI::GetFactoryInstance() {
366 return g_factory.Pointer(); 366 return g_factory.Pointer();
367 } 367 }
368 368
369 } // namespace extensions 369 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/prefs/command_line_pref_store.cc ('k') | chrome/browser/ui/webui/net_internals/net_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698