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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
187 | 187 |
188 SessionsTable::iterator iter = sessions_.find(session_id); | 188 SessionsTable::iterator iter = sessions_.find(session_id); |
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 DCHECK_NE(context.render_frame_id, 0); | |
ncarter (slow)
2014/07/10 01:17:52
Do you want to check "!= 0" or do you want to chec
miu
2014/07/10 22:16:12
My intention was to confirm the value was being se
| |
197 context.label = media_stream_manager_->MakeMediaAccessRequest( | 198 context.label = media_stream_manager_->MakeMediaAccessRequest( |
198 context.render_process_id, | 199 context.render_process_id, |
199 context.render_view_id, | 200 context.render_frame_id, |
200 context.request_id, | 201 context.request_id, |
201 StreamOptions(true, false), | 202 StreamOptions(true, false), |
202 GURL(context.context_name), | 203 GURL(context.context_name), |
203 base::Bind( | 204 base::Bind( |
204 &SpeechRecognitionManagerImpl::MediaRequestPermissionCallback, | 205 &SpeechRecognitionManagerImpl::MediaRequestPermissionCallback, |
205 weak_factory_.GetWeakPtr(), session_id)); | 206 weak_factory_.GetWeakPtr(), session_id)); |
206 return; | 207 return; |
207 } | 208 } |
208 | 209 |
209 if (is_allowed) { | 210 if (is_allowed) { |
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
691 SpeechRecognitionManagerImpl::Session::Session() | 692 SpeechRecognitionManagerImpl::Session::Session() |
692 : id(kSessionIDInvalid), | 693 : id(kSessionIDInvalid), |
693 abort_requested(false), | 694 abort_requested(false), |
694 listener_is_active(true) { | 695 listener_is_active(true) { |
695 } | 696 } |
696 | 697 |
697 SpeechRecognitionManagerImpl::Session::~Session() { | 698 SpeechRecognitionManagerImpl::Session::~Session() { |
698 } | 699 } |
699 | 700 |
700 } // namespace content | 701 } // namespace content |
OLD | NEW |