| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/speech/speech_recognition_dispatcher_host.h" | 5 #include "content/browser/speech/speech_recognition_dispatcher_host.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "content/browser/browser_plugin/browser_plugin_guest.h" | 10 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 return handled; | 57 return handled; |
| 58 } | 58 } |
| 59 | 59 |
| 60 void SpeechRecognitionDispatcherHost::OverrideThreadForMessage( | 60 void SpeechRecognitionDispatcherHost::OverrideThreadForMessage( |
| 61 const IPC::Message& message, | 61 const IPC::Message& message, |
| 62 BrowserThread::ID* thread) { | 62 BrowserThread::ID* thread) { |
| 63 if (message.type() == SpeechRecognitionHostMsg_StartRequest::ID) | 63 if (message.type() == SpeechRecognitionHostMsg_StartRequest::ID) |
| 64 *thread = BrowserThread::UI; | 64 *thread = BrowserThread::UI; |
| 65 } | 65 } |
| 66 | 66 |
| 67 void SpeechRecognitionDispatcherHost::OnChannelClosing() { | 67 void SpeechRecognitionDispatcherHost::OnSenderClosing() { |
| 68 weak_factory_.InvalidateWeakPtrs(); | 68 weak_factory_.InvalidateWeakPtrs(); |
| 69 } | 69 } |
| 70 | 70 |
| 71 void SpeechRecognitionDispatcherHost::OnStartRequest( | 71 void SpeechRecognitionDispatcherHost::OnStartRequest( |
| 72 const SpeechRecognitionHostMsg_StartRequest_Params& params) { | 72 const SpeechRecognitionHostMsg_StartRequest_Params& params) { |
| 73 SpeechRecognitionHostMsg_StartRequest_Params input_params(params); | 73 SpeechRecognitionHostMsg_StartRequest_Params input_params(params); |
| 74 | 74 |
| 75 // Check that the origin specified by the renderer process is one | 75 // Check that the origin specified by the renderer process is one |
| 76 // that it is allowed to access. | 76 // that it is allowed to access. |
| 77 if (params.origin_url != "null" && | 77 if (params.origin_url != "null" && |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 void SpeechRecognitionDispatcherHost::OnAudioLevelsChange(int session_id, | 245 void SpeechRecognitionDispatcherHost::OnAudioLevelsChange(int session_id, |
| 246 float volume, | 246 float volume, |
| 247 float noise_volume) { | 247 float noise_volume) { |
| 248 } | 248 } |
| 249 | 249 |
| 250 void SpeechRecognitionDispatcherHost::OnEnvironmentEstimationComplete( | 250 void SpeechRecognitionDispatcherHost::OnEnvironmentEstimationComplete( |
| 251 int session_id) { | 251 int session_id) { |
| 252 } | 252 } |
| 253 | 253 |
| 254 } // namespace content | 254 } // namespace content |
| OLD | NEW |