Chromium Code Reviews| Index: chrome/browser/media/router/presentation_service_delegate_impl.cc |
| diff --git a/chrome/browser/media/router/presentation_service_delegate_impl.cc b/chrome/browser/media/router/presentation_service_delegate_impl.cc |
| index 99ef1d08981ba13b9ccf601034b14644095d305f..c75b4a01980273e3a0100969236f5d186ad8bb23 100644 |
| --- a/chrome/browser/media/router/presentation_service_delegate_impl.cc |
| +++ b/chrome/browser/media/router/presentation_service_delegate_impl.cc |
| @@ -21,6 +21,8 @@ |
| #include "chrome/browser/media/router/media_router_factory.h" |
| #include "chrome/browser/media/router/media_sink.h" |
| #include "chrome/browser/media/router/media_source_helper.h" |
| +#include "chrome/browser/media/router/offscreen_presentation_manager.h" |
| +#include "chrome/browser/media/router/offscreen_presentation_manager_factory.h" |
| #include "chrome/browser/media/router/presentation_media_sinks_observer.h" |
| #include "chrome/browser/media/router/route_message.h" |
| #include "chrome/browser/media/router/route_message_observer.h" |
| @@ -31,6 +33,7 @@ |
| #include "content/public/browser/presentation_session.h" |
| #include "content/public/browser/render_frame_host.h" |
| #include "content/public/browser/render_process_host.h" |
| +#include "url/gurl.h" |
| DEFINE_WEB_CONTENTS_USER_DATA_KEY( |
| media_router::PresentationServiceDelegateImpl); |
| @@ -666,6 +669,9 @@ PresentationServiceDelegateImpl::PresentationServiceDelegateImpl( |
| router_(MediaRouterFactory::GetApiForBrowserContext( |
| web_contents_->GetBrowserContext())), |
| frame_manager_(new PresentationFrameManager(web_contents, router_)), |
| + offscreen_presentation_manager_( |
| + OffscreenPresentationManagerFactory::GetOrCreateForBrowserContext( |
|
mark a. foltz
2016/10/08 00:33:41
Maybe there could be a OffscreenPresentationManage
zhaobin
2016/10/12 02:27:33
Done.
|
| + web_contents_->GetBrowserContext())), |
| weak_factory_(this) { |
| DCHECK(web_contents_); |
| DCHECK(router_); |
| @@ -914,6 +920,21 @@ void PresentationServiceDelegateImpl::ListenForConnectionStateChange( |
| state_changed_cb); |
| } |
| +void PresentationServiceDelegateImpl::RegisterReceiverAvailableCallback( |
| + const content::ReceiverConnectionAvailableCallback& |
| + receiver_available_callback) {} |
|
mark a. foltz
2016/10/08 00:33:41
This is not implemented for the controller's PSImp
zhaobin
2016/10/12 02:27:33
Done.
|
| + |
| +void PresentationServiceDelegateImpl::RegisterOffscreenPresentationConnection( |
| + int render_process_id, |
| + int render_frame_id, |
| + const content::PresentationSessionInfo& session, |
| + content::PresentationConnectionPtr connection) { |
| + RenderFrameHostId render_frame_host_id(render_process_id, render_frame_id); |
| + offscreen_presentation_manager_->RegisterOffscreenPresentationController( |
| + session.presentation_id, GURL(session.presentation_url), |
| + render_frame_host_id, std::move(connection)); |
| +} |
| + |
| void PresentationServiceDelegateImpl::OnRouteResponse( |
| const PresentationRequest& presentation_request, |
| const RouteRequestResult& result) { |