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

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

Issue 2471573005: [Presentation API] (5th) (1-UA) integrate controller and receiver side for 1-UA messaging (Closed)
Patch Set: call OPM.unregisterOPMController() in PresentationFrame::Reset() 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/offscreen_presentation_manager.cc
diff --git a/chrome/browser/media/router/offscreen_presentation_manager.cc b/chrome/browser/media/router/offscreen_presentation_manager.cc
index 1cb996ae22ef9a20c4cc34ed23629e3f353fd172..abd5cd37f3488dbd2b25bf0fddfd48657bd84d00 100644
--- a/chrome/browser/media/router/offscreen_presentation_manager.cc
+++ b/chrome/browser/media/router/offscreen_presentation_manager.cc
@@ -61,9 +61,11 @@ void OffscreenPresentationManager::UnregisterOffscreenPresentationController(
// Remove presentation if no controller and receiver.
it->second->UnregisterController(render_frame_host_id);
- if (it->second->pending_controllers_.size() == 0 &&
- it->second->receiver_callback_.is_null())
+ if (!it->second->IsValid()) {
+ DLOG(WARNING) << __func__ << " no receiver callback has been registered to "
+ << "[presentation_id]: " << presentation_id;
offscreen_presentations_.erase(presentation_id);
+ }
}
void OffscreenPresentationManager::OnOffscreenPresentationReceiverCreated(

Powered by Google App Engine
This is Rietveld 408576698