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

Unified Diff: content/renderer/presentation/presentation_connection_proxy.h

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
« no previous file with comments | « no previous file | content/renderer/presentation/presentation_connection_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/presentation/presentation_connection_proxy.h
diff --git a/content/renderer/presentation/presentation_connection_proxy.h b/content/renderer/presentation/presentation_connection_proxy.h
index f6a56b472666593ad77a042dff5022ceb0443443..4d33ab5258110116d2030421bdd3517b5b2fafc7 100644
--- a/content/renderer/presentation/presentation_connection_proxy.h
+++ b/content/renderer/presentation/presentation_connection_proxy.h
@@ -116,8 +116,13 @@ class CONTENT_EXPORT ControllerConnectionProxy
class CONTENT_EXPORT ReceiverConnectionProxy
: public PresentationConnectionProxy {
public:
+ // Invoked when |source_connection_| transition to 'closed' state. Remove
+ // |source_connection_| from blink PresentationReceiver's connection list.
mark a. foltz 2017/05/12 22:22:19 nit: s/blink//
zhaobin 2017/05/15 17:46:03 Done.
+ using OnConnectionClosedCallback = base::Callback<void()>;
+
explicit ReceiverConnectionProxy(
- blink::WebPresentationConnection* receiver_connection);
+ blink::WebPresentationConnection* receiver_connection,
+ const OnConnectionClosedCallback& connection_closed_callback);
~ReceiverConnectionProxy() override;
void Bind(
@@ -127,6 +132,13 @@ class CONTENT_EXPORT ReceiverConnectionProxy
// called only once.
void BindControllerConnection(
blink::mojom::PresentationConnectionPtr controller_connection_ptr);
+
+ // PresentationConnectionProxy override
+ void DidChangeState(content::PresentationConnectionState state) override;
+
+ private:
+ // See comments for |OnConnectionClosedCallback|.
+ OnConnectionClosedCallback connection_closed_callback_;
};
} // namespace content
« no previous file with comments | « no previous file | content/renderer/presentation/presentation_connection_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698