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 |