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

Unified Diff: Source/modules/speech/SpeechRecognition.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: Fixing compile errors Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: Source/modules/speech/SpeechRecognition.cpp
diff --git a/Source/modules/speech/SpeechRecognition.cpp b/Source/modules/speech/SpeechRecognition.cpp
index 9309fe571c22f61a05c5ec9b5e46297064540470..fc3ded0915f07a68c53699b458d519d49e0f81aa 100644
--- a/Source/modules/speech/SpeechRecognition.cpp
+++ b/Source/modules/speech/SpeechRecognition.cpp
@@ -35,6 +35,7 @@
#include "modules/speech/SpeechRecognitionController.h"
#include "modules/speech/SpeechRecognitionError.h"
#include "modules/speech/SpeechRecognitionEvent.h"
+#include "platform/weborigin/KURL.h"
namespace blink {
@@ -58,8 +59,15 @@ void SpeechRecognition::start(ExceptionState& exceptionState)
return;
}
+ KURL url(ParsedURLString, m_serviceURI);
+ // Throw an error if serviceuri is not empty and url is invalid.
+ if (!m_serviceURI.isEmpty() && !url.isValid()) {
+ exceptionState.throwDOMException(SyntaxError, "serviceuri is invalid");
jochen (gone - plz use gerrit) 2015/05/05 13:57:53 the attribute is "serviceURI". also, please add a
kirtia 2015/05/05 23:12:29 Done.
+ return;
+ }
+
m_finalResults.clear();
- m_controller->start(this, m_grammars, m_lang, m_serviceURI, m_continuous, m_interimResults, m_maxAlternatives, m_audioTrack);
+ m_controller->start(this, m_grammars, m_lang, url, m_continuous, m_interimResults, m_maxAlternatives, m_audioTrack);
m_started = true;
}
« no previous file with comments | « no previous file | Source/modules/speech/SpeechRecognitionClient.h » ('j') | Source/modules/speech/SpeechRecognitionController.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698