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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2696443002: Reland of Use spec-compliant algorithm to select video devices in getUserMedia. (Closed)
Patch Set: Address boliu's comments Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 264c934af1782382c8593f714d7f9529d2fcca55..8867e039a1abc45a5768971c5de0a860dad3e744 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -6130,14 +6130,16 @@ void RenderFrameImpl::SyncSelectionIfRequired() {
}
void RenderFrameImpl::InitializeUserMediaClient() {
- if (!RenderThreadImpl::current()) // Will be NULL during unit tests.
+ RenderThreadImpl* render_thread = RenderThreadImpl::current();
+ if (!render_thread) // Will be NULL during unit tests.
return;
#if BUILDFLAG(ENABLE_WEBRTC)
DCHECK(!web_user_media_client_);
web_user_media_client_ = new UserMediaClientImpl(
this, RenderThreadImpl::current()->GetPeerConnectionDependencyFactory(),
- base::MakeUnique<MediaStreamDispatcher>(this));
+ base::MakeUnique<MediaStreamDispatcher>(this),
+ render_thread->GetWorkerTaskRunner());
GetInterfaceRegistry()->AddInterface(
base::Bind(&MediaDevicesListenerImpl::Create, GetRoutingID()));
#endif
« no previous file with comments | « content/renderer/media/user_media_client_impl_unittest.cc ('k') | extensions/browser/guest_view/app_view/app_view_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698