| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_input_dispatcher_host.h" | 5 #include "content/browser/speech/speech_input_dispatcher_host.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "content/browser/content_browser_client.h" | |
| 9 #include "content/browser/speech/speech_input_preferences.h" | 8 #include "content/browser/speech/speech_input_preferences.h" |
| 10 #include "content/common/speech_input_messages.h" | 9 #include "content/common/speech_input_messages.h" |
| 10 #include "content/public/browser/content_browser_client.h" |
| 11 | 11 |
| 12 namespace speech_input { | 12 namespace speech_input { |
| 13 | 13 |
| 14 //----------------------------- SpeechInputCallers ----------------------------- | 14 //----------------------------- SpeechInputCallers ----------------------------- |
| 15 | 15 |
| 16 // A singleton class to map the tuple | 16 // A singleton class to map the tuple |
| 17 // (render-process-id, render-view-id, requestid) to a single ID which is passed | 17 // (render-process-id, render-view-id, requestid) to a single ID which is passed |
| 18 // through rest of the speech code. | 18 // through rest of the speech code. |
| 19 class SpeechInputDispatcherHost::SpeechInputCallers { | 19 class SpeechInputDispatcherHost::SpeechInputCallers { |
| 20 public: | 20 public: |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 g_speech_input_callers.Get().render_view_id(caller_id); | 220 g_speech_input_callers.Get().render_view_id(caller_id); |
| 221 int caller_request_id = g_speech_input_callers.Get().request_id(caller_id); | 221 int caller_request_id = g_speech_input_callers.Get().request_id(caller_id); |
| 222 Send(new SpeechInputMsg_RecognitionComplete(caller_render_view_id, | 222 Send(new SpeechInputMsg_RecognitionComplete(caller_render_view_id, |
| 223 caller_request_id)); | 223 caller_request_id)); |
| 224 // Request sequence ended, so remove mapping. | 224 // Request sequence ended, so remove mapping. |
| 225 g_speech_input_callers.Get().RemoveId(caller_id); | 225 g_speech_input_callers.Get().RemoveId(caller_id); |
| 226 VLOG(1) << "SpeechInputDispatcherHost::DidCompleteRecognition exit"; | 226 VLOG(1) << "SpeechInputDispatcherHost::DidCompleteRecognition exit"; |
| 227 } | 227 } |
| 228 | 228 |
| 229 } // namespace speech_input | 229 } // namespace speech_input |
| OLD | NEW |