Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3980)

Unified Diff: chrome/browser/media/router/presentation_service_delegate_impl.cc

Issue 2343013002: [Presentation API] (MR side) 1-UA: notify receiver page when receiver connection becomes available (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 581357dced0c7900c4062f72870482a748830424..55565fbf921135bef91be8f2036fc12f0477582b 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"
@@ -666,9 +668,13 @@ PresentationServiceDelegateImpl::PresentationServiceDelegateImpl(
router_(MediaRouterFactory::GetApiForBrowserContext(
web_contents_->GetBrowserContext())),
frame_manager_(new PresentationFrameManager(web_contents, router_)),
+ m_offscreenPresentationManager(
+ OffscreenPresentationManagerFactory::GetOrCreateForBrowserContext(
+ web_contents_->GetBrowserContext())),
weak_factory_(this) {
DCHECK(web_contents_);
DCHECK(router_);
+ DCHECK(m_offscreenPresentationManager);
}
PresentationServiceDelegateImpl::~PresentationServiceDelegateImpl() {
@@ -966,4 +972,18 @@ bool PresentationServiceDelegateImpl::HasScreenAvailabilityListenerForTest(
render_frame_host_id, source_id);
}
+void PresentationServiceDelegateImpl::RegisterOffscreenPresentationController(
+ const std::string& presentation_id,
+ content::OffscreenPresentationClient* client) {
+ m_offscreenPresentationManager->RegisterOffscreenPresentationController(
+ presentation_id, client);
+}
+
+void PresentationServiceDelegateImpl::UnregisterOffscreenPresentationController(
+ const std::string& presentation_id,
+ content::OffscreenPresentationClient* client) {
+ m_offscreenPresentationManager->UnregisterOffscreenPresentationController(
+ presentation_id, client);
+}
+
} // namespace media_router

Powered by Google App Engine
This is Rietveld 408576698