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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 2669243004: Use spec-compliant algorithm to select video devices in getUserMedia. (Closed)
Patch Set: address tommi's comment 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 6079 matching lines...) Expand 10 before | Expand all | Expand 10 after
6090 selection_text_ != text) { 6090 selection_text_ != text) {
6091 selection_text_ = text; 6091 selection_text_ = text;
6092 selection_text_offset_ = offset; 6092 selection_text_offset_ = offset;
6093 selection_range_ = range; 6093 selection_range_ = range;
6094 SetSelectedText(text, offset, range); 6094 SetSelectedText(text, offset, range);
6095 } 6095 }
6096 GetRenderWidget()->UpdateSelectionBounds(); 6096 GetRenderWidget()->UpdateSelectionBounds();
6097 } 6097 }
6098 6098
6099 void RenderFrameImpl::InitializeUserMediaClient() { 6099 void RenderFrameImpl::InitializeUserMediaClient() {
6100 if (!RenderThreadImpl::current()) // Will be NULL during unit tests. 6100 RenderThreadImpl* render_thread = RenderThreadImpl::current();
6101 if (!render_thread) // Will be NULL during unit tests.
6101 return; 6102 return;
6102 6103
6103 #if BUILDFLAG(ENABLE_WEBRTC) 6104 #if BUILDFLAG(ENABLE_WEBRTC)
6104 DCHECK(!web_user_media_client_); 6105 DCHECK(!web_user_media_client_);
6105 web_user_media_client_ = new UserMediaClientImpl( 6106 web_user_media_client_ = new UserMediaClientImpl(
6106 this, RenderThreadImpl::current()->GetPeerConnectionDependencyFactory(), 6107 this, RenderThreadImpl::current()->GetPeerConnectionDependencyFactory(),
6107 base::MakeUnique<MediaStreamDispatcher>(this)); 6108 base::MakeUnique<MediaStreamDispatcher>(this),
6109 render_thread->GetWorkerTaskRunner());
6108 GetInterfaceRegistry()->AddInterface( 6110 GetInterfaceRegistry()->AddInterface(
6109 base::Bind(&MediaDevicesListenerImpl::Create, GetRoutingID())); 6111 base::Bind(&MediaDevicesListenerImpl::Create, GetRoutingID()));
6110 #endif 6112 #endif
6111 } 6113 }
6112 6114
6113 WebMediaPlayer* RenderFrameImpl::CreateWebMediaPlayerForMediaStream( 6115 WebMediaPlayer* RenderFrameImpl::CreateWebMediaPlayerForMediaStream(
6114 WebMediaPlayerClient* client, 6116 WebMediaPlayerClient* client,
6115 const WebString& sink_id, 6117 const WebString& sink_id,
6116 const WebSecurityOrigin& security_origin) { 6118 const WebSecurityOrigin& security_origin) {
6117 #if BUILDFLAG(ENABLE_WEBRTC) 6119 #if BUILDFLAG(ENABLE_WEBRTC)
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
6814 // event target. Potentially a Pepper plugin will receive the event. 6816 // event target. Potentially a Pepper plugin will receive the event.
6815 // In order to tell whether a plugin gets the last mouse event and which it 6817 // In order to tell whether a plugin gets the last mouse event and which it
6816 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6818 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6817 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6819 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6818 // |pepper_last_mouse_event_target_|. 6820 // |pepper_last_mouse_event_target_|.
6819 pepper_last_mouse_event_target_ = nullptr; 6821 pepper_last_mouse_event_target_ = nullptr;
6820 #endif 6822 #endif
6821 } 6823 }
6822 6824
6823 } // namespace content 6825 } // namespace content
OLDNEW
« 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