Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(366)

Side by Side Diff: Source/web/SpeechRecognitionClientProxy.cpp

Issue 1117383002: Changing serviceuri param to be url from string in Blink and tagging requests to speech recognizer Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removing the exception on invalid urls, adding chromium to client param of serviceURI, and changing… Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/web/SpeechRecognitionClientProxy.h ('k') | public/web/WebSpeechRecognitionParams.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 SpeechRecognitionClientProxy::~SpeechRecognitionClientProxy() 49 SpeechRecognitionClientProxy::~SpeechRecognitionClientProxy()
50 { 50 {
51 } 51 }
52 52
53 PassOwnPtr<SpeechRecognitionClientProxy> SpeechRecognitionClientProxy::create(We bSpeechRecognizer* recognizer) 53 PassOwnPtr<SpeechRecognitionClientProxy> SpeechRecognitionClientProxy::create(We bSpeechRecognizer* recognizer)
54 { 54 {
55 return adoptPtr(new SpeechRecognitionClientProxy(recognizer)); 55 return adoptPtr(new SpeechRecognitionClientProxy(recognizer));
56 } 56 }
57 57
58 void SpeechRecognitionClientProxy::start(SpeechRecognition* recognition, const S peechGrammarList* grammarList, const String& lang, const String& serviceURI, boo l continuous, bool interimResults, unsigned long maxAlternatives, MediaStreamTra ck* audioTrack) 58 void SpeechRecognitionClientProxy::start(SpeechRecognition* recognition, const S peechGrammarList* grammarList, const String& lang, const KURL& serviceURI, bool continuous, bool interimResults, unsigned long maxAlternatives, MediaStreamTrack * audioTrack)
59 { 59 {
60 WebVector<WebSpeechGrammar> webSpeechGrammars(static_cast<size_t>(grammarLis t->length())); 60 WebVector<WebSpeechGrammar> webSpeechGrammars(static_cast<size_t>(grammarLis t->length()));
61 for (unsigned long i = 0; i < grammarList->length(); ++i) 61 for (unsigned long i = 0; i < grammarList->length(); ++i)
62 webSpeechGrammars[i] = grammarList->item(i); 62 webSpeechGrammars[i] = grammarList->item(i);
63 63
64 WebMediaStreamTrack track; 64 WebMediaStreamTrack track;
65 if (RuntimeEnabledFeatures::mediaStreamSpeechEnabled() && audioTrack) 65 if (RuntimeEnabledFeatures::mediaStreamSpeechEnabled() && audioTrack)
66 track.assign(audioTrack->component()); 66 track.assign(audioTrack->component());
67 WebSpeechRecognitionParams params(webSpeechGrammars, lang, serviceURI, conti nuous, interimResults, maxAlternatives, track, WebSecurityOrigin(recognition->ex ecutionContext()->securityOrigin())); 67 WebSpeechRecognitionParams params(webSpeechGrammars, lang, serviceURI, conti nuous, interimResults, maxAlternatives, track, WebSecurityOrigin(recognition->ex ecutionContext()->securityOrigin()));
68 m_recognizer->start(recognition, params, this); 68 m_recognizer->start(recognition, params, this);
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 SpeechRecognition* recognition(handle); 143 SpeechRecognition* recognition(handle);
144 recognition->didEnd(); 144 recognition->didEnd();
145 } 145 }
146 146
147 SpeechRecognitionClientProxy::SpeechRecognitionClientProxy(WebSpeechRecognizer* recognizer) 147 SpeechRecognitionClientProxy::SpeechRecognitionClientProxy(WebSpeechRecognizer* recognizer)
148 : m_recognizer(recognizer) 148 : m_recognizer(recognizer)
149 { 149 {
150 } 150 }
151 151
152 } // namespace blink 152 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/SpeechRecognitionClientProxy.h ('k') | public/web/WebSpeechRecognitionParams.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698