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
3 // found in the LICENSE file.
5 #ifndef CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_SESSION_CONFIG_H_
6 #define CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_SESSION_CONFIG_H_
10 #include "base/basictypes.h"
11 #include "base/memory/ref_counted.h"
12 #include "base/memory/weak_ptr.h"
13 #include "content/common/content_export.h"
14 #include "content/public/browser/speech_recognition_session_context.h"
15 #include "content/public/browser/speech_recognition_session_preamble.h"
16 #include "content/public/common/speech_recognition_grammar.h"
17 #include "net/url_request/url_request_context_getter.h"
21 class SpeechRecognitionEventListener
;
23 // Configuration params for creating a new speech recognition session.
24 struct CONTENT_EXPORT SpeechRecognitionSessionConfig
{
25 SpeechRecognitionSessionConfig();
26 ~SpeechRecognitionSessionConfig();
28 // TODO(hans): The legacy API is dead; remove this flag (crbug.com/223198).
32 SpeechRecognitionGrammarArray grammars
;
33 std::string origin_url
;
34 bool filter_profanities
;
37 uint32 max_hypotheses
;
38 std::string auth_token
;
39 std::string auth_scope
;
40 scoped_refptr
<SpeechRecognitionSessionPreamble
> preamble
;
41 SpeechRecognitionSessionContext initial_context
;
42 scoped_refptr
<net::URLRequestContextGetter
> url_request_context_getter
;
43 base::WeakPtr
<SpeechRecognitionEventListener
> event_listener
;
46 } // namespace content
48 #endif // CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_SESSION_CONFIG_H_