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

Side by Side Diff: chrome/browser/extensions/extension_tts_api.h

Issue 6733043: Coverity: Pass parameters by reference. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_TTS_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_TTS_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_TTS_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_TTS_API_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <string> 9 #include <string>
10 10
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // Speak the given utterance. If the utterance's can_enqueue flag is true 141 // Speak the given utterance. If the utterance's can_enqueue flag is true
142 // and another utterance is in progress, adds it to the end of the queue. 142 // and another utterance is in progress, adds it to the end of the queue.
143 // Otherwise, interrupts any current utterance and speaks this one 143 // Otherwise, interrupts any current utterance and speaks this one
144 // immediately. 144 // immediately.
145 void SpeakOrEnqueue(Utterance* utterance); 145 void SpeakOrEnqueue(Utterance* utterance);
146 146
147 // Stop all utterances and flush the queue. 147 // Stop all utterances and flush the queue.
148 void Stop(); 148 void Stop();
149 149
150 // Called when an extension finishes speaking an utterance. 150 // Called when an extension finishes speaking an utterance.
151 void OnSpeechFinished(int request_id, std::string error_message); 151 void OnSpeechFinished(int request_id, const std::string& error_message);
152 152
153 // For unit testing. 153 // For unit testing.
154 void SetPlatformImpl(ExtensionTtsPlatformImpl* platform_impl); 154 void SetPlatformImpl(ExtensionTtsPlatformImpl* platform_impl);
155 155
156 private: 156 private:
157 ExtensionTtsController(); 157 ExtensionTtsController();
158 virtual ~ExtensionTtsController(); 158 virtual ~ExtensionTtsController();
159 159
160 // Get the platform TTS implementation (or injected mock). 160 // Get the platform TTS implementation (or injected mock).
161 ExtensionTtsPlatformImpl* GetPlatformImpl(); 161 ExtensionTtsPlatformImpl* GetPlatformImpl();
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 }; 227 };
228 228
229 class ExtensionTtsSpeakCompletedFunction : public SyncExtensionFunction { 229 class ExtensionTtsSpeakCompletedFunction : public SyncExtensionFunction {
230 private: 230 private:
231 ~ExtensionTtsSpeakCompletedFunction() {} 231 ~ExtensionTtsSpeakCompletedFunction() {}
232 virtual bool RunImpl(); 232 virtual bool RunImpl();
233 DECLARE_EXTENSION_FUNCTION_NAME("experimental.tts.speakCompleted") 233 DECLARE_EXTENSION_FUNCTION_NAME("experimental.tts.speakCompleted")
234 }; 234 };
235 235
236 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TTS_API_H_ 236 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TTS_API_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_tabs_module.cc ('k') | chrome/browser/extensions/extension_tts_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698