| 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 "base/memory/weak_ptr.h" |
| 11 #include "base/process/process_handle.h" |
| 11 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
| 12 #include "content/public/browser/speech_recognition_session_context.h" | 13 #include "content/public/browser/speech_recognition_session_context.h" |
| 13 #include "content/public/common/speech_recognition_grammar.h" | 14 #include "content/public/common/speech_recognition_grammar.h" |
| 14 #include "net/url_request/url_request_context_getter.h" | 15 #include "net/url_request/url_request_context_getter.h" |
| 15 | 16 |
| 16 namespace content { | 17 namespace content { |
| 17 | 18 |
| 18 class SpeechRecognitionEventListener; | 19 class SpeechRecognitionEventListener; |
| 19 | 20 |
| 20 // Configuration params for creating a new speech recognition session. | 21 // Configuration params for creating a new speech recognition session. |
| 21 struct CONTENT_EXPORT SpeechRecognitionSessionConfig { | 22 struct CONTENT_EXPORT SpeechRecognitionSessionConfig { |
| 22 SpeechRecognitionSessionConfig(); | 23 SpeechRecognitionSessionConfig(); |
| 23 ~SpeechRecognitionSessionConfig(); | 24 ~SpeechRecognitionSessionConfig(); |
| 24 | 25 |
| 25 // TODO(hans): The legacy API is dead; remove this flag (crbug.com/223198). | 26 // TODO(hans): The legacy API is dead; remove this flag (crbug.com/223198). |
| 26 bool is_legacy_api; | 27 bool is_legacy_api; |
| 27 | 28 |
| 28 std::string language; | 29 std::string language; |
| 29 SpeechRecognitionGrammarArray grammars; | 30 SpeechRecognitionGrammarArray grammars; |
| 30 std::string origin_url; | 31 std::string origin_url; |
| 31 bool filter_profanities; | 32 bool filter_profanities; |
| 32 bool continuous; | 33 bool continuous; |
| 33 bool interim_results; | 34 bool interim_results; |
| 35 bool using_audio_track; |
| 36 base::ProcessHandle peer_process_handle; |
| 34 uint32 max_hypotheses; | 37 uint32 max_hypotheses; |
| 35 SpeechRecognitionSessionContext initial_context; | 38 SpeechRecognitionSessionContext initial_context; |
| 36 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter; | 39 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter; |
| 37 base::WeakPtr<SpeechRecognitionEventListener> event_listener; | 40 base::WeakPtr<SpeechRecognitionEventListener> event_listener; |
| 38 }; | 41 }; |
| 39 | 42 |
| 40 } // namespace content | 43 } // namespace content |
| 41 | 44 |
| 42 #endif // CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_SESSION_CONFIG_H_ | 45 #endif // CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_SESSION_CONFIG_H_ |
| OLD | NEW |