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

Unified Diff: content/renderer/render_view_impl.cc

Issue 10008077: Adding JSEP PeerConnection glue - attempt 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 8 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
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | content/renderer/renderer_webkitplatformsupport_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 58a36217bbac33b30d8b555c0b87718c27edd94c..a1d080610b92492b5a23af910b3c4e85975e2454 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -137,6 +137,8 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGraphicsContext3D.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebImage.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConnection00Handler.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConnection00HandlerClient.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConnectionHandler.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConnectionHandlerClient.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h"
@@ -229,6 +231,10 @@ using WebKit::WebNavigationType;
using WebKit::WebNode;
using WebKit::WebPageSerializer;
using WebKit::WebPageSerializerClient;
+using WebKit::WebPeerConnection00Handler;
+using WebKit::WebPeerConnection00HandlerClient;
+using WebKit::WebPeerConnectionHandler;
+using WebKit::WebPeerConnectionHandlerClient;
using WebKit::WebPlugin;
using WebKit::WebPluginAction;
using WebKit::WebPluginContainer;
@@ -645,17 +651,22 @@ RenderViewImpl* RenderViewImpl::Create(
guest);
}
-WebKit::WebPeerConnectionHandler* RenderViewImpl::CreatePeerConnectionHandler(
- WebKit::WebPeerConnectionHandlerClient* client) {
- const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
- if (!cmd_line->HasSwitch(switches::kEnableMediaStream))
- return NULL;
+WebPeerConnectionHandler* RenderViewImpl::CreatePeerConnectionHandler(
+ WebPeerConnectionHandlerClient* client) {
EnsureMediaStreamImpl();
if (!media_stream_impl_.get())
return NULL;
return media_stream_impl_->CreatePeerConnectionHandler(client);
}
+WebPeerConnection00Handler* RenderViewImpl::CreatePeerConnectionHandlerJsep(
+ WebPeerConnection00HandlerClient* client) {
+ EnsureMediaStreamImpl();
+ if (!media_stream_impl_.get())
+ return NULL;
+ return media_stream_impl_->CreatePeerConnectionHandlerJsep(client);
+}
+
void RenderViewImpl::AddObserver(RenderViewObserver* observer) {
observers_.AddObserver(observer);
}
@@ -3277,6 +3288,10 @@ void RenderViewImpl::CheckPreferredSize() {
}
void RenderViewImpl::EnsureMediaStreamImpl() {
+ const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
+ if (!cmd_line->HasSwitch(switches::kEnableMediaStream))
+ return;
+
#if defined(ENABLE_P2P_APIS)
if (!p2p_socket_dispatcher_)
p2p_socket_dispatcher_ = new content::P2PSocketDispatcher(this);
@@ -5145,9 +5160,6 @@ WebKit::WebPageVisibilityState RenderViewImpl::visibilityState() const {
}
WebKit::WebUserMediaClient* RenderViewImpl::userMediaClient() {
- const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
- if (!cmd_line->HasSwitch(switches::kEnableMediaStream))
- return NULL;
EnsureMediaStreamImpl();
return media_stream_impl_;
}
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | content/renderer/renderer_webkitplatformsupport_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698