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

Unified Diff: third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp

Issue 2863903002: [Presentation API] Change controller connection to 'terminated' when receiver connection terminates (Closed)
Patch Set: fix layout test failures 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: third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp b/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp
index c53e1566af5bdd926c9d71049c4e1798cad4078d..aff5037bc1ac75e4fe5449193fcd08692915f982 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp
+++ b/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp
@@ -462,11 +462,19 @@ void PresentationConnection::DidChangeState(
NOTREACHED();
}
+void PresentationConnection::NotifyTargetConnection(
+ WebPresentationConnectionState state) {
+ if (proxy_)
+ proxy_->NotifyTargetConnection(state);
+}
+
void PresentationConnection::DidClose(
WebPresentationConnectionCloseReason reason,
const String& message) {
- if (state_ == WebPresentationConnectionState::kClosed)
+ if (state_ == WebPresentationConnectionState::kClosed ||
+ state_ == WebPresentationConnectionState::kTerminated) {
return;
+ }
state_ = WebPresentationConnectionState::kClosed;
DispatchStateChangeEvent(PresentationConnectionCloseEvent::Create(

Powered by Google App Engine
This is Rietveld 408576698