OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/common/speech_input_messages.h" | 8 #include "content/common/speech_input_messages.h" |
9 | 9 |
10 namespace speech_input { | 10 namespace speech_input { |
11 | 11 |
12 //----------------------------- SpeechInputCallers ----------------------------- | 12 //----------------------------- SpeechInputCallers ----------------------------- |
13 | 13 |
14 // A singleton class to map the tuple | 14 // A singleton class to map the tuple |
15 // (render-process-id, render-view-id, requestid) to a single ID which is passed | 15 // (render-process-id, render-view-id, requestid) to a single ID which is passed |
16 // through rest of the speech code. | 16 // through rest of the speech code. |
17 class SpeechInputDispatcherHost::SpeechInputCallers { | 17 class SpeechInputDispatcherHost::SpeechInputCallers { |
18 public: | 18 public: |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 g_speech_input_callers.Get().render_view_id(caller_id); | 204 g_speech_input_callers.Get().render_view_id(caller_id); |
205 int caller_request_id = g_speech_input_callers.Get().request_id(caller_id); | 205 int caller_request_id = g_speech_input_callers.Get().request_id(caller_id); |
206 Send(new SpeechInputMsg_RecognitionComplete(caller_render_view_id, | 206 Send(new SpeechInputMsg_RecognitionComplete(caller_render_view_id, |
207 caller_request_id)); | 207 caller_request_id)); |
208 // Request sequence ended, so remove mapping. | 208 // Request sequence ended, so remove mapping. |
209 g_speech_input_callers.Get().RemoveId(caller_id); | 209 g_speech_input_callers.Get().RemoveId(caller_id); |
210 VLOG(1) << "SpeechInputDispatcherHost::DidCompleteRecognition exit"; | 210 VLOG(1) << "SpeechInputDispatcherHost::DidCompleteRecognition exit"; |
211 } | 211 } |
212 | 212 |
213 } // namespace speech_input | 213 } // namespace speech_input |
OLD | NEW |