| Index: content/renderer/presentation/presentation_dispatcher.cc
|
| diff --git a/content/renderer/presentation/presentation_dispatcher.cc b/content/renderer/presentation/presentation_dispatcher.cc
|
| index 7621c0193218aaaef9a585d0298021a993426978..f3a4f9ec80da77911150969e0362b65ff9a2a6c8 100644
|
| --- a/content/renderer/presentation/presentation_dispatcher.cc
|
| +++ b/content/renderer/presentation/presentation_dispatcher.cc
|
| @@ -282,9 +282,14 @@ void PresentationDispatcher::closeSession(
|
| presentationId.utf8());
|
| }
|
|
|
| -void PresentationDispatcher::terminateSession(
|
| +void PresentationDispatcher::terminateConnection(
|
| const blink::WebURL& presentationUrl,
|
| const blink::WebString& presentationId) {
|
| + if (receiver_) {
|
| + receiver_->terminateConnection();
|
| + return;
|
| + }
|
| +
|
| ConnectToPresentationServiceIfNeeded();
|
| presentation_service_->Terminate(presentationUrl, presentationId.utf8());
|
| }
|
| @@ -403,6 +408,14 @@ void PresentationDispatcher::OnDestruct() {
|
| delete this;
|
| }
|
|
|
| +void PresentationDispatcher::WidgetWillClose() {
|
| + if (!receiver_)
|
| + return;
|
| +
|
| + receiver_->didChangeSessionState(
|
| + blink::WebPresentationConnectionState::Terminated);
|
| +}
|
| +
|
| void PresentationDispatcher::OnScreenAvailabilityUpdated(const GURL& url,
|
| bool available) {
|
| auto* listening_status = GetListeningStatus(url);
|
|
|