| 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/resource_context.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" |
| 11 #include "content/public/browser/content_browser_client.h" | 10 #include "content/public/browser/content_browser_client.h" |
| 11 #include "content/public/browser/resource_context.h" |
| 12 | 12 |
| 13 using content::BrowserThread; | 13 using content::BrowserThread; |
| 14 | 14 |
| 15 namespace speech_input { | 15 namespace speech_input { |
| 16 | 16 |
| 17 //----------------------------- SpeechInputCallers ----------------------------- | 17 //----------------------------- SpeechInputCallers ----------------------------- |
| 18 | 18 |
| 19 // A singleton class to map the tuple | 19 // A singleton class to map the tuple |
| 20 // (render-process-id, render-view-id, requestid) to a single ID which is passed | 20 // (render-process-id, render-view-id, requestid) to a single ID which is passed |
| 21 // through rest of the speech code. | 21 // through rest of the speech code. |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 g_speech_input_callers.Get().render_view_id(caller_id); | 227 g_speech_input_callers.Get().render_view_id(caller_id); |
| 228 int caller_request_id = g_speech_input_callers.Get().request_id(caller_id); | 228 int caller_request_id = g_speech_input_callers.Get().request_id(caller_id); |
| 229 Send(new SpeechInputMsg_RecognitionComplete(caller_render_view_id, | 229 Send(new SpeechInputMsg_RecognitionComplete(caller_render_view_id, |
| 230 caller_request_id)); | 230 caller_request_id)); |
| 231 // Request sequence ended, so remove mapping. | 231 // Request sequence ended, so remove mapping. |
| 232 g_speech_input_callers.Get().RemoveId(caller_id); | 232 g_speech_input_callers.Get().RemoveId(caller_id); |
| 233 VLOG(1) << "SpeechInputDispatcherHost::DidCompleteRecognition exit"; | 233 VLOG(1) << "SpeechInputDispatcherHost::DidCompleteRecognition exit"; |
| 234 } | 234 } |
| 235 | 235 |
| 236 } // namespace speech_input | 236 } // namespace speech_input |
| OLD | NEW |