Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: content/browser/speech/speech_recognition_manager_impl.cc

Issue 364123002: [Cross-Site Isolation] Migrate entire MediaStream verticals to be per-RenderFrame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: It's random enough. + REBASE Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/browser/speech/speech_recognition_dispatcher_host.cc ('k') | content/common/media/media_stream_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698