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

Unified Diff: content/browser/speech/speech_recognition_dispatcher_host.cc

Issue 415933002: Turn webspeech on/off when tab goes fore/background (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge the previous change Created 6 years, 5 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: content/browser/speech/speech_recognition_dispatcher_host.cc
diff --git a/content/browser/speech/speech_recognition_dispatcher_host.cc b/content/browser/speech/speech_recognition_dispatcher_host.cc
index 0197bcf4acc72b6c110958f1508e078dc36740cd..05a24527efe7e80ed3f5ea1171c0f2dff412238e 100644
--- a/content/browser/speech/speech_recognition_dispatcher_host.cc
+++ b/content/browser/speech/speech_recognition_dispatcher_host.cc
@@ -52,6 +52,8 @@ bool SpeechRecognitionDispatcherHost::OnMessageReceived(
OnAbortRequest)
IPC_MESSAGE_HANDLER(SpeechRecognitionHostMsg_StopCaptureRequest,
OnStopCaptureRequest)
+ IPC_MESSAGE_HANDLER(SpeechRecognitionHostMsg_AbortAllRequests,
+ OnAbortAllRequests)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
@@ -164,6 +166,11 @@ void SpeechRecognitionDispatcherHost::OnAbortRequest(int render_view_id,
SpeechRecognitionManager::GetInstance()->AbortSession(session_id);
}
+void SpeechRecognitionDispatcherHost::OnAbortAllRequests(int render_view_id) {
+ SpeechRecognitionManager::GetInstance()->AbortAllSessionsForRenderView(
+ render_process_id_, render_view_id);
+}
+
void SpeechRecognitionDispatcherHost::OnStopCaptureRequest(
int render_view_id, int request_id) {
int session_id = SpeechRecognitionManager::GetInstance()->GetSession(
« no previous file with comments | « content/browser/speech/speech_recognition_dispatcher_host.h ('k') | content/common/speech_recognition_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698