Commit a5b5ce49 authored by Antonio Gomes's avatar Antonio Gomes Committed by Commit Bot

Add a SharedMainThreadContextProvider method to Platform

This CL is a preparation step to Onion soup webmediaplayer_ms.cc|h
and webmediaplayer_ms_compositor.cc|h
It adds to blink::Platform a methods that expose SharedMainThreadContextProvider()
functionality of RenderThreadImpl needed by WebMediaPlayerMS.

It is part of the phase 4.4 in the design doc [1].

[1] https://docs.google.com/document/d/1rHJGi1U72qZsOGIctIf7GKRaY8d7BgtVW8MaMYumzYY/

BUG=704136
R=guidou@chromium.org, haraken@chromium.org

Change-Id: I3e6534e1a7e362da905ddd78e7e88d51adb5e6eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1693241
Commit-Queue: Antonio Gomes (use @igalia instead) <tonikitoo@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#676201}
parent a148d276
......@@ -541,6 +541,11 @@ RendererBlinkPlatformImpl::NewAudioCapturerSource(
RenderFrame::GetRoutingIdForWebFrame(web_frame), params);
}
viz::ContextProvider*
RendererBlinkPlatformImpl::SharedMainThreadContextProvider() {
return RenderThreadImpl::current()->SharedMainThreadContextProvider().get();
}
//------------------------------------------------------------------------------
std::unique_ptr<WebRTCPeerConnectionHandler>
......
......@@ -127,6 +127,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
scoped_refptr<media::AudioCapturerSource> NewAudioCapturerSource(
blink::WebLocalFrame* web_frame,
const media::AudioSourceParameters& params) override;
viz::ContextProvider* SharedMainThreadContextProvider() override;
std::unique_ptr<blink::WebRTCPeerConnectionHandler>
CreateRTCPeerConnectionHandler(
blink::WebRTCPeerConnectionHandlerClient* client,
......
......@@ -100,6 +100,10 @@ template <class T>
class Local;
}
namespace viz {
class ContextProvider;
}
namespace webrtc {
struct RtpCapabilities;
class AsyncResolverFactory;
......@@ -554,6 +558,10 @@ class BLINK_PLATFORM_EXPORT Platform {
return nullptr;
}
virtual viz::ContextProvider* SharedMainThreadContextProvider() {
return nullptr;
}
// WebRTC ----------------------------------------------------------
// Creates a WebRTCPeerConnectionHandler for RTCPeerConnection.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment