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

Side by Side Diff: content/public/browser/speech_recognizer.h

Issue 9972008: Refactoring of chrome speech recognition architecture (CL1.6) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 #ifndef CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNIZER_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNIZER_H_
6 #define CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNIZER_H_ 6 #define CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNIZER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
12 12
13 namespace net { 13 namespace net {
14 class URLRequestContextGetter; 14 class URLRequestContextGetter;
15 } 15 }
16 16
17 namespace content { 17 namespace content {
18 18
19 class SpeechRecognitionEventListener; 19 class SpeechRecognitionEventListener;
20 20
21 // Records audio, sends recorded audio to server and translates server response 21 // Records audio, sends recorded audio to server and translates server response
22 // to recognition result. 22 // to recognition result.
23 // TODO(primiano) remove this public interface as soon as we fix speech input 23 // TODO(primiano) remove this public interface as soon as we fix speech input
24 // extensions. 24 // extensions.
25 class SpeechRecognizer : public base::RefCountedThreadSafe<SpeechRecognizer> { 25 class SpeechRecognizer : public base::RefCountedThreadSafe<SpeechRecognizer> {
26 public: 26 public:
27 27
28 // TODO(primiano) Create(...) is transitional (until we fix speech input
Primiano Tucci (use gerrit) 2012/04/16 11:46:43 Moved this comment to content/browser/speech/speec
29 // extensions) and should be removed soon. The manager should be the only one
30 // knowing the existence of SpeechRecognizer, thus the only one in charge of
31 // instantiating it.
32 CONTENT_EXPORT static SpeechRecognizer* Create( 28 CONTENT_EXPORT static SpeechRecognizer* Create(
33 SpeechRecognitionEventListener* event_listener, 29 SpeechRecognitionEventListener* event_listener,
34 int caller_id, 30 int session_id,
35 const std::string& language, 31 const std::string& language,
36 const std::string& grammar, 32 const std::string& grammar,
37 net::URLRequestContextGetter* context_getter, 33 net::URLRequestContextGetter* context_getter,
38 bool filter_profanities, 34 bool filter_profanities,
39 const std::string& hardware_info, 35 const std::string& hardware_info,
40 const std::string& origin_url); 36 const std::string& origin_url);
41 37
42 virtual ~SpeechRecognizer() {} 38 virtual ~SpeechRecognizer() {}
43 39
44 // Starts audio recording and the recognition process. The same 40 // Starts audio recording and the recognition process. The same
(...skipping 14 matching lines...) Expand all
59 // or waiting for a result. 55 // or waiting for a result.
60 virtual bool IsActive() const = 0; 56 virtual bool IsActive() const = 0;
61 57
62 // Checks wether the recognizer is capturing audio. 58 // Checks wether the recognizer is capturing audio.
63 virtual bool IsCapturingAudio() const = 0; 59 virtual bool IsCapturingAudio() const = 0;
64 }; 60 };
65 61
66 } // namespace content 62 } // namespace content
67 63
68 #endif // CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNIZER_H_ 64 #endif // CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNIZER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698