| Index: content/renderer/render_view_impl.cc
|
| diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
|
| index b498938ad257d928dec60703ff296a4d797e925e..c110235b75764d27c0216128448202f4f2062777 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"
|
| @@ -228,6 +230,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;
|
| @@ -644,17 +650,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);
|
| }
|
| @@ -3276,6 +3287,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);
|
| @@ -5144,9 +5159,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_;
|
| }
|
|
|