OLD | NEW |
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_RECOGNITION_SESSION_CONFIG_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_SESSION_CONFIG_H_ |
6 #define CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_SESSION_CONFIG_H_ | 6 #define CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_SESSION_CONFIG_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/weak_ptr.h" |
10 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
11 #include "content/public/browser/speech_recognition_session_context.h" | 12 #include "content/public/browser/speech_recognition_session_context.h" |
12 #include "content/public/common/speech_recognition_grammar.h" | 13 #include "content/public/common/speech_recognition_grammar.h" |
13 #include "net/url_request/url_request_context_getter.h" | 14 #include "net/url_request/url_request_context_getter.h" |
14 | 15 |
15 namespace content { | 16 namespace content { |
16 | 17 |
17 class SpeechRecognitionEventListener; | 18 class SpeechRecognitionEventListener; |
18 | 19 |
19 // Configuration params for creating a new speech recognition session. | 20 // Configuration params for creating a new speech recognition session. |
20 struct CONTENT_EXPORT SpeechRecognitionSessionConfig { | 21 struct CONTENT_EXPORT SpeechRecognitionSessionConfig { |
21 SpeechRecognitionSessionConfig(); | 22 SpeechRecognitionSessionConfig(); |
22 ~SpeechRecognitionSessionConfig(); | 23 ~SpeechRecognitionSessionConfig(); |
23 | 24 |
24 bool is_legacy_api; | 25 bool is_legacy_api; |
25 std::string language; | 26 std::string language; |
26 SpeechRecognitionGrammarArray grammars; | 27 SpeechRecognitionGrammarArray grammars; |
27 std::string origin_url; | 28 std::string origin_url; |
28 bool filter_profanities; | 29 bool filter_profanities; |
29 bool continuous; | 30 bool continuous; |
30 bool interim_results; | 31 bool interim_results; |
31 uint32 max_hypotheses; | 32 uint32 max_hypotheses; |
32 SpeechRecognitionSessionContext initial_context; | 33 SpeechRecognitionSessionContext initial_context; |
33 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter; | 34 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter; |
34 SpeechRecognitionEventListener* event_listener; | 35 base::WeakPtr<SpeechRecognitionEventListener> event_listener; |
35 }; | 36 }; |
36 | 37 |
37 } // namespace content | 38 } // namespace content |
38 | 39 |
39 #endif // CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_SESSION_CONFIG_H_ | 40 #endif // CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_SESSION_CONFIG_H_ |
OLD | NEW |