| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * * Redistributions of source code must retain the above copyright | 7 * * Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * * Redistributions in binary form must reproduce the above copyright | 9 * * Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef WebSpeechRecognitionParams_h | 26 #ifndef WebSpeechRecognitionParams_h |
| 27 #define WebSpeechRecognitionParams_h | 27 #define WebSpeechRecognitionParams_h |
| 28 | 28 |
| 29 #include "../platform/WebMediaStreamTrack.h" | 29 #include "../platform/WebMediaStreamTrack.h" |
| 30 #include "../platform/WebString.h" | 30 #include "../platform/WebString.h" |
| 31 #include "../platform/WebURL.h" | |
| 32 #include "../platform/WebVector.h" | 31 #include "../platform/WebVector.h" |
| 33 #include "WebSecurityOrigin.h" | 32 #include "WebSecurityOrigin.h" |
| 34 #include "WebSpeechGrammar.h" | 33 #include "WebSpeechGrammar.h" |
| 35 | 34 |
| 36 namespace blink { | 35 namespace blink { |
| 37 | 36 |
| 38 class WebSpeechGrammar; | 37 class WebSpeechGrammar; |
| 39 | 38 |
| 40 class WebSpeechRecognitionParams { | 39 class WebSpeechRecognitionParams { |
| 41 public: | 40 public: |
| 42 WebSpeechRecognitionParams(const WebVector<WebSpeechGrammar>& grammars, cons
t WebString& language, const WebURL& serviceURI, bool continuous, bool interimRe
sults, unsigned long maxAlternatives, const WebMediaStreamTrack& audioTrack, con
st WebSecurityOrigin& origin) | 41 WebSpeechRecognitionParams(const WebVector<WebSpeechGrammar>& grammars, cons
t WebString& language, bool continuous, bool interimResults, unsigned long maxAl
ternatives, const WebMediaStreamTrack& audioTrack, const WebSecurityOrigin& orig
in) |
| 43 : m_grammars(grammars) | 42 : m_grammars(grammars) |
| 44 , m_language(language) | 43 , m_language(language) |
| 45 , m_serviceURI(serviceURI) | |
| 46 , m_continuous(continuous) | 44 , m_continuous(continuous) |
| 47 , m_interimResults(interimResults) | 45 , m_interimResults(interimResults) |
| 48 , m_maxAlternatives(maxAlternatives) | 46 , m_maxAlternatives(maxAlternatives) |
| 49 , m_audioTrack(audioTrack) | 47 , m_audioTrack(audioTrack) |
| 50 , m_origin(origin) | 48 , m_origin(origin) |
| 51 { | 49 { |
| 52 } | 50 } |
| 53 | 51 |
| 54 const WebVector<WebSpeechGrammar>& grammars() const { return m_grammars; } | 52 const WebVector<WebSpeechGrammar>& grammars() const { return m_grammars; } |
| 55 const WebString& language() const { return m_language; } | 53 const WebString& language() const { return m_language; } |
| 56 const WebURL& serviceURI() const { return m_serviceURI; } | |
| 57 bool continuous() const { return m_continuous; } | 54 bool continuous() const { return m_continuous; } |
| 58 bool interimResults() const { return m_interimResults; } | 55 bool interimResults() const { return m_interimResults; } |
| 59 unsigned long maxAlternatives() const { return m_maxAlternatives; } | 56 unsigned long maxAlternatives() const { return m_maxAlternatives; } |
| 60 const WebMediaStreamTrack& audioTrack() const { return m_audioTrack; } | 57 const WebMediaStreamTrack& audioTrack() const { return m_audioTrack; } |
| 61 const WebSecurityOrigin& origin() const { return m_origin; } | 58 const WebSecurityOrigin& origin() const { return m_origin; } |
| 62 | 59 |
| 63 private: | 60 private: |
| 64 WebVector<WebSpeechGrammar> m_grammars; | 61 WebVector<WebSpeechGrammar> m_grammars; |
| 65 WebString m_language; | 62 WebString m_language; |
| 66 WebURL m_serviceURI; | |
| 67 bool m_continuous; | 63 bool m_continuous; |
| 68 bool m_interimResults; | 64 bool m_interimResults; |
| 69 unsigned long m_maxAlternatives; | 65 unsigned long m_maxAlternatives; |
| 70 WebMediaStreamTrack m_audioTrack; | 66 WebMediaStreamTrack m_audioTrack; |
| 71 WebSecurityOrigin m_origin; | 67 WebSecurityOrigin m_origin; |
| 72 }; | 68 }; |
| 73 | 69 |
| 74 } // namespace blink | 70 } // namespace blink |
| 75 | 71 |
| 76 #endif // WebSpeechRecognitionParams_h | 72 #endif // WebSpeechRecognitionParams_h |
| OLD | NEW |