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

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

Issue 2471573005: [Presentation API] (5th) (1-UA) integrate controller and receiver side for 1-UA messaging (Closed)
Patch Set: rebase Created 4 years, 1 month 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 263f937eeb2871d3f3a67b2d785bcda3f001db71..4c349f3e7596f32df50fe28c8e22cf77012a92da 100644
--- a/chrome/browser/media/router/presentation_service_delegate_impl.cc
+++ b/chrome/browser/media/router/presentation_service_delegate_impl.cc
@@ -169,7 +169,7 @@ class PresentationFrame {
RenderFrameHostId render_frame_host_id_;
// References to the owning WebContents, and the corresponding MediaRouter.
- const content::WebContents* web_contents_;
+ content::WebContents* web_contents_;
MediaRouter* router_;
};
@@ -244,8 +244,14 @@ bool PresentationFrame::HasScreenAvailabilityListenerForTest(
}
void PresentationFrame::Reset() {
- for (const auto& pid_route_id : presentation_id_to_route_id_)
+ auto offscreen_presentation_manager = OffscreenPresentationManagerFactory::
+ GetOrCreateForControllerBrowserContext(web_contents_);
+
+ for (const auto& pid_route_id : presentation_id_to_route_id_) {
+ offscreen_presentation_manager->UnregisterOffscreenPresentationController(
+ pid_route_id.first, render_frame_host_id_);
mark a. foltz 2016/11/16 01:25:37 Side comment: If we could ensure 1 route == 1 pres
router_->DetachRoute(pid_route_id.second);
+ }
presentation_id_to_route_id_.clear();
url_to_sinks_observer_.clear();

Powered by Google App Engine
This is Rietveld 408576698