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 27 matching lines...) Expand all Loading... |
38 SpeechRecognitionManager::GetInstance()->AbortAllSessionsForRenderProcess( | 38 SpeechRecognitionManager::GetInstance()->AbortAllSessionsForRenderProcess( |
39 render_process_id_); | 39 render_process_id_); |
40 } | 40 } |
41 | 41 |
42 base::WeakPtr<SpeechRecognitionDispatcherHost> | 42 base::WeakPtr<SpeechRecognitionDispatcherHost> |
43 SpeechRecognitionDispatcherHost::AsWeakPtr() { | 43 SpeechRecognitionDispatcherHost::AsWeakPtr() { |
44 return weak_factory_.GetWeakPtr(); | 44 return weak_factory_.GetWeakPtr(); |
45 } | 45 } |
46 | 46 |
47 bool SpeechRecognitionDispatcherHost::OnMessageReceived( | 47 bool SpeechRecognitionDispatcherHost::OnMessageReceived( |
48 const IPC::Message& message, bool* message_was_ok) { | 48 const IPC::Message& message) { |
49 bool handled = true; | 49 bool handled = true; |
50 IPC_BEGIN_MESSAGE_MAP_EX(SpeechRecognitionDispatcherHost, message, | 50 IPC_BEGIN_MESSAGE_MAP(SpeechRecognitionDispatcherHost, message) |
51 *message_was_ok) | |
52 IPC_MESSAGE_HANDLER(SpeechRecognitionHostMsg_StartRequest, | 51 IPC_MESSAGE_HANDLER(SpeechRecognitionHostMsg_StartRequest, |
53 OnStartRequest) | 52 OnStartRequest) |
54 IPC_MESSAGE_HANDLER(SpeechRecognitionHostMsg_AbortRequest, | 53 IPC_MESSAGE_HANDLER(SpeechRecognitionHostMsg_AbortRequest, |
55 OnAbortRequest) | 54 OnAbortRequest) |
56 IPC_MESSAGE_HANDLER(SpeechRecognitionHostMsg_StopCaptureRequest, | 55 IPC_MESSAGE_HANDLER(SpeechRecognitionHostMsg_StopCaptureRequest, |
57 OnStopCaptureRequest) | 56 OnStopCaptureRequest) |
58 IPC_MESSAGE_UNHANDLED(handled = false) | 57 IPC_MESSAGE_UNHANDLED(handled = false) |
59 IPC_END_MESSAGE_MAP() | 58 IPC_END_MESSAGE_MAP() |
60 return handled; | 59 return handled; |
61 } | 60 } |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 void SpeechRecognitionDispatcherHost::OnAudioLevelsChange(int session_id, | 248 void SpeechRecognitionDispatcherHost::OnAudioLevelsChange(int session_id, |
250 float volume, | 249 float volume, |
251 float noise_volume) { | 250 float noise_volume) { |
252 } | 251 } |
253 | 252 |
254 void SpeechRecognitionDispatcherHost::OnEnvironmentEstimationComplete( | 253 void SpeechRecognitionDispatcherHost::OnEnvironmentEstimationComplete( |
255 int session_id) { | 254 int session_id) { |
256 } | 255 } |
257 | 256 |
258 } // namespace content | 257 } // namespace content |
OLD | NEW |