| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_manager_impl.h" | 5 #include "content/browser/speech/speech_recognition_manager_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "content/browser/browser_main_loop.h" | 8 #include "content/browser/browser_main_loop.h" |
| 9 #include "content/browser/renderer_host/media/media_stream_manager.h" | 9 #include "content/browser/renderer_host/media/media_stream_manager.h" |
| 10 #include "content/browser/renderer_host/media/media_stream_ui_proxy.h" | 10 #include "content/browser/renderer_host/media/media_stream_ui_proxy.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 } else { | 140 } else { |
| 141 google_remote_engine = new GoogleStreamingRemoteEngine( | 141 google_remote_engine = new GoogleStreamingRemoteEngine( |
| 142 config.url_request_context_getter.get()); | 142 config.url_request_context_getter.get()); |
| 143 } | 143 } |
| 144 | 144 |
| 145 google_remote_engine->SetConfig(remote_engine_config); | 145 google_remote_engine->SetConfig(remote_engine_config); |
| 146 | 146 |
| 147 session->recognizer = new SpeechRecognizerImpl( | 147 session->recognizer = new SpeechRecognizerImpl( |
| 148 this, | 148 this, |
| 149 session_id, | 149 session_id, |
| 150 !config.continuous, | 150 config.continuous, |
| 151 config.interim_results, |
| 151 google_remote_engine); | 152 google_remote_engine); |
| 152 #else | 153 #else |
| 153 session->recognizer = new SpeechRecognizerImplAndroid(this, session_id); | 154 session->recognizer = new SpeechRecognizerImplAndroid(this, session_id); |
| 154 #endif | 155 #endif |
| 155 return session_id; | 156 return session_id; |
| 156 } | 157 } |
| 157 | 158 |
| 158 void SpeechRecognitionManagerImpl::StartSession(int session_id) { | 159 void SpeechRecognitionManagerImpl::StartSession(int session_id) { |
| 159 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 160 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 160 if (!SessionExists(session_id)) | 161 if (!SessionExists(session_id)) |
| (...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 SpeechRecognitionManagerImpl::Session::Session() | 688 SpeechRecognitionManagerImpl::Session::Session() |
| 688 : id(kSessionIDInvalid), | 689 : id(kSessionIDInvalid), |
| 689 abort_requested(false), | 690 abort_requested(false), |
| 690 listener_is_active(true) { | 691 listener_is_active(true) { |
| 691 } | 692 } |
| 692 | 693 |
| 693 SpeechRecognitionManagerImpl::Session::~Session() { | 694 SpeechRecognitionManagerImpl::Session::~Session() { |
| 694 } | 695 } |
| 695 | 696 |
| 696 } // namespace content | 697 } // namespace content |
| OLD | NEW |