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