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

Unified Diff: content/renderer/media/media_stream_center.cc

Issue 10919122: Move creation of PeerConnection from the RenderView to the RenderThreadImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased to latest codec base. Created 8 years, 3 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/media/media_stream_center.cc
diff --git a/content/renderer/media/media_stream_center.cc b/content/renderer/media/media_stream_center.cc
index c7b2f4cc343affac9151a24583030214d0447419..aa9124a84bd87c1d81f901a12e6eeea71fac68cf 100644
--- a/content/renderer/media/media_stream_center.cc
+++ b/content/renderer/media/media_stream_center.cc
@@ -10,8 +10,9 @@
#include "base/memory/scoped_ptr.h"
#include "base/string_number_conversions.h"
#include "base/utf_string_conversions.h"
-#include "content/renderer/media/media_stream_impl.h"
#include "content/renderer/media/media_stream_extra_data.h"
+#include "content/renderer/media/media_stream_dependency_factory.h"
+#include "content/renderer/media/media_stream_impl.h"
#include "content/renderer/render_view_impl.h"
#include "third_party/libjingle/source/talk/app/webrtc/jsep.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebICECandidateDescriptor.h"
@@ -83,7 +84,10 @@ static webrtc::MediaStreamTrackInterface* GetNativeMediaStreamTrack(
return NULL;
}
-MediaStreamCenter::MediaStreamCenter(WebKit::WebMediaStreamCenterClient*) {}
+MediaStreamCenter::MediaStreamCenter(WebKit::WebMediaStreamCenterClient*,
tommi (sloooow) - chröme 2012/09/12 13:10:24 missing variable name
perkj_chrome 2012/09/12 13:54:39 Added but it is unused.
+ MediaStreamDependencyFactory* factory)
+ : rtc_factory_(factory) {
+}
void MediaStreamCenter::queryMediaStreamSources(
const WebKit::WebMediaStreamSourcesRequest& request) {
@@ -126,15 +130,9 @@ void MediaStreamCenter::didStopLocalMediaStream(
void MediaStreamCenter::didCreateMediaStream(
WebKit::WebMediaStreamDescriptor& stream) {
- WebKit::WebFrame* web_frame = WebKit::WebFrame::frameForCurrentContext();
- if (!web_frame)
+ if (!rtc_factory_)
return;
- MediaStreamImpl* ms_impl = GetMediaStreamImpl(web_frame);
- if (ms_impl) {
- ms_impl->CreateMediaStream(web_frame, &stream);
- return;
- }
- NOTREACHED();
+ rtc_factory_->CreateNativeLocalMediaStream(&stream);
}
WebKit::WebString MediaStreamCenter::constructSDP(

Powered by Google App Engine
This is Rietveld 408576698