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

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

Issue 10694106: Added support for multiple parameters to Extension API callbacks. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Synced. Created 8 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
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/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 controller->SpeakOrEnqueue(utterance); 156 controller->SpeakOrEnqueue(utterance);
157 return true; 157 return true;
158 } 158 }
159 159
160 bool ExtensionTtsStopSpeakingFunction::RunImpl() { 160 bool ExtensionTtsStopSpeakingFunction::RunImpl() {
161 ExtensionTtsController::GetInstance()->Stop(); 161 ExtensionTtsController::GetInstance()->Stop();
162 return true; 162 return true;
163 } 163 }
164 164
165 bool ExtensionTtsIsSpeakingFunction::RunImpl() { 165 bool ExtensionTtsIsSpeakingFunction::RunImpl() {
166 result_.reset(Value::CreateBooleanValue( 166 SetResult(Value::CreateBooleanValue(
167 ExtensionTtsController::GetInstance()->IsSpeaking())); 167 ExtensionTtsController::GetInstance()->IsSpeaking()));
168 return true; 168 return true;
169 } 169 }
170 170
171 bool ExtensionTtsGetVoicesFunction::RunImpl() { 171 bool ExtensionTtsGetVoicesFunction::RunImpl() {
172 result_.reset(ExtensionTtsController::GetInstance()->GetVoices(profile())); 172 SetResult(ExtensionTtsController::GetInstance()->GetVoices(profile()));
173 return true; 173 return true;
174 } 174 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698