Chromium Code Reviews| Index: content/renderer/renderer_webkitplatformsupport_impl.cc |
| diff --git a/content/renderer/renderer_webkitplatformsupport_impl.cc b/content/renderer/renderer_webkitplatformsupport_impl.cc |
| index 2611add479528274868ebfdebdff3b7a059cbfbf..7859c12017ff18cd506a0d3eebd5e78b2e44ad83 100644 |
| --- a/content/renderer/renderer_webkitplatformsupport_impl.cc |
| +++ b/content/renderer/renderer_webkitplatformsupport_impl.cc |
| @@ -23,6 +23,7 @@ |
| #include "content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h" |
| #include "content/renderer/media/audio_device.h" |
| #include "content/renderer/render_thread_impl.h" |
| +#include "content/renderer/render_view_impl.h" |
| #include "content/renderer/renderer_webaudiodevice_impl.h" |
| #include "content/renderer/renderer_webidbfactory_impl.h" |
| #include "content/renderer/renderer_webstoragenamespace_impl.h" |
| @@ -35,6 +36,9 @@ |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBFactory.h" |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKey.h" |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKeyPath.h" |
| +#include "third_party/WebKit/Source/WebKit/chromium/public/WebPeerConnectionHandler.h" |
| +#include "third_party/WebKit/Source/WebKit/chromium/public/WebPeerConnectionHandlerClient.h" |
| +#include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebSerializedScriptValue.h" |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageEventDispatcher.h" |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" |
| @@ -614,3 +618,20 @@ WebKit::WebString RendererWebKitPlatformSupportImpl::userAgent( |
| return WebKitPlatformSupportImpl::userAgent(url); |
| } |
| +//------------------------------------------------------------------------------ |
| + |
| +WebKit::WebPeerConnectionHandler* |
| +RendererWebKitPlatformSupportImpl::createPeerConnectionHandler( |
| + WebKit::WebPeerConnectionHandlerClient* client) { |
| + // TODO(grunell): Do we really need this? Isn't it already checked in WebKit |
| + // before calling us? |
|
tommi (sloooow) - chröme
2011/11/08 12:27:24
address before checkin?
Henrik Grunell
2011/11/08 22:06:41
Yes I will. I'll get back to this shortly.
|
| + if (!WebKit::WebRuntimeFeatures::isMediaStreamEnabled()) |
| + return NULL; |
| + WebKit::WebFrame* web_frame = WebKit::WebFrame::frameForCurrentContext(); |
| + if (!web_frame) |
| + return NULL; |
| + RenderViewImpl* render_view = RenderViewImpl::FromWebView(web_frame->view()); |
| + if (!render_view) |
| + return NULL; |
|
tommi (sloooow) - chröme
2011/11/08 12:27:24
do we need to delete web_frame here or is ownershi
Henrik Grunell
2011/11/08 22:06:41
I think it's only a weak ptr, I'll check this and
|
| + return render_view->CreatePeerConnectionHandler(client); |
| +} |