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

Unified Diff: content/renderer/presentation/presentation_dispatcher.cc

Issue 2874483002: [Presentation API] Remove closed connections from PresentationConnectionList (Closed)
Patch Set: Created 3 years, 7 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: content/renderer/presentation/presentation_dispatcher.cc
diff --git a/content/renderer/presentation/presentation_dispatcher.cc b/content/renderer/presentation/presentation_dispatcher.cc
index 2bb5bb076b71964707d2bf0e8d952519a5969cdf..5e43990d7a74e812e6d6a9eb929e7d00caeaa1e4 100644
--- a/content/renderer/presentation/presentation_dispatcher.cc
+++ b/content/renderer/presentation/presentation_dispatcher.cc
@@ -577,7 +577,9 @@ void PresentationDispatcher::OnReceiverConnectionAvailable(
receiver_->OnReceiverConnectionAvailable(blink::WebPresentationInfo(
presentation_info.presentation_url,
blink::WebString::FromUTF8(presentation_info.presentation_id)));
- auto* receiver_connection_proxy = new ReceiverConnectionProxy(connection);
+ auto* receiver_connection_proxy = new ReceiverConnectionProxy(
+ connection, base::Bind(&blink::WebPresentationReceiver::RemoveConnection,
+ base::Unretained(receiver_), connection));
connection->BindProxy(base::WrapUnique(receiver_connection_proxy));
receiver_connection_proxy->Bind(std::move(receiver_connection_request));

Powered by Google App Engine
This is Rietveld 408576698