| Index: content/browser/speech/speech_input_dispatcher_host.cc
|
| diff --git a/content/browser/speech/speech_input_dispatcher_host.cc b/content/browser/speech/speech_input_dispatcher_host.cc
|
| index 84e2a9530ada6de74718f08ce3169ee3e424917c..d721fee6f5d326f17d2204285cb76e37aa891964 100644
|
| --- a/content/browser/speech/speech_input_dispatcher_host.cc
|
| +++ b/content/browser/speech/speech_input_dispatcher_host.cc
|
| @@ -129,30 +129,18 @@ SpeechInputManager* SpeechInputDispatcherHost::manager() {
|
| bool SpeechInputDispatcherHost::OnMessageReceived(
|
| const IPC::Message& message, bool* message_was_ok) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
| -
|
| - uint32 message_type = message.type();
|
| - if (message_type == SpeechInputHostMsg_StartRecognition::ID ||
|
| - message_type == SpeechInputHostMsg_CancelRecognition::ID ||
|
| - message_type == SpeechInputHostMsg_StopRecording::ID) {
|
| - if (!SpeechInputManager::IsFeatureEnabled()) {
|
| - *message_was_ok = false;
|
| - return true;
|
| - }
|
| -
|
| - may_have_pending_requests_ = true;
|
| - IPC_BEGIN_MESSAGE_MAP_EX(SpeechInputDispatcherHost, message,
|
| - *message_was_ok)
|
| - IPC_MESSAGE_HANDLER(SpeechInputHostMsg_StartRecognition,
|
| - OnStartRecognition)
|
| - IPC_MESSAGE_HANDLER(SpeechInputHostMsg_CancelRecognition,
|
| - OnCancelRecognition)
|
| - IPC_MESSAGE_HANDLER(SpeechInputHostMsg_StopRecording,
|
| - OnStopRecording)
|
| - IPC_END_MESSAGE_MAP()
|
| - return true;
|
| - }
|
| -
|
| - return false;
|
| + bool handled = true;
|
| + IPC_BEGIN_MESSAGE_MAP_EX(SpeechInputDispatcherHost, message,
|
| + *message_was_ok)
|
| + IPC_MESSAGE_HANDLER(SpeechInputHostMsg_StartRecognition,
|
| + OnStartRecognition)
|
| + IPC_MESSAGE_HANDLER(SpeechInputHostMsg_CancelRecognition,
|
| + OnCancelRecognition)
|
| + IPC_MESSAGE_HANDLER(SpeechInputHostMsg_StopRecording,
|
| + OnStopRecording)
|
| + IPC_MESSAGE_UNHANDLED(handled = false)
|
| + IPC_END_MESSAGE_MAP()
|
| + return handled;
|
| }
|
|
|
| void SpeechInputDispatcherHost::OnStartRecognition(
|
|
|