| 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_;
|
| }
|
|
|