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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 DCHECK(iter != sessions_.end()); | 189 DCHECK(iter != sessions_.end()); |
190 Session* session = iter->second; | 190 Session* session = iter->second; |
191 | 191 |
192 if (session->abort_requested) | 192 if (session->abort_requested) |
193 return; | 193 return; |
194 | 194 |
195 if (ask_user) { | 195 if (ask_user) { |
196 SpeechRecognitionSessionContext& context = session->context; | 196 SpeechRecognitionSessionContext& context = session->context; |
197 context.label = media_stream_manager_->MakeMediaAccessRequest( | 197 context.label = media_stream_manager_->MakeMediaAccessRequest( |
198 context.render_process_id, | 198 context.render_process_id, |
199 context.render_view_id, | 199 context.render_frame_id, |
200 context.request_id, | 200 context.request_id, |
201 StreamOptions(true, false), | 201 StreamOptions(true, false), |
202 GURL(context.context_name), | 202 GURL(context.context_name), |
203 base::Bind( | 203 base::Bind( |
204 &SpeechRecognitionManagerImpl::MediaRequestPermissionCallback, | 204 &SpeechRecognitionManagerImpl::MediaRequestPermissionCallback, |
205 weak_factory_.GetWeakPtr(), session_id)); | 205 weak_factory_.GetWeakPtr(), session_id)); |
206 return; | 206 return; |
207 } | 207 } |
208 | 208 |
209 if (is_allowed) { | 209 if (is_allowed) { |
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
691 SpeechRecognitionManagerImpl::Session::Session() | 691 SpeechRecognitionManagerImpl::Session::Session() |
692 : id(kSessionIDInvalid), | 692 : id(kSessionIDInvalid), |
693 abort_requested(false), | 693 abort_requested(false), |
694 listener_is_active(true) { | 694 listener_is_active(true) { |
695 } | 695 } |
696 | 696 |
697 SpeechRecognitionManagerImpl::Session::~Session() { | 697 SpeechRecognitionManagerImpl::Session::~Session() { |
698 } | 698 } |
699 | 699 |
700 } // namespace content | 700 } // namespace content |
OLD | NEW |