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

Unified Diff: content/browser/presentation/presentation_service_impl.cc

Issue 2470023002: [Presentation API] change initial state of PresentationConnection to 'connecting' (Closed)
Patch Set: Created 4 years, 1 month 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 | third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/presentation/presentation_service_impl.cc
diff --git a/content/browser/presentation/presentation_service_impl.cc b/content/browser/presentation/presentation_service_impl.cc
index 46ec67cf0158791d666a023c92abfb3e71e47546..ec09147694bb4139f0304b3378e9562fba246aaf 100644
--- a/content/browser/presentation/presentation_service_impl.cc
+++ b/content/browser/presentation/presentation_service_impl.cc
@@ -307,6 +307,9 @@ void PresentationServiceImpl::OnStartSessionSucceeded(
ListenForConnectionStateChange(session_info);
pending_start_session_cb_.reset();
start_session_request_id_ = kInvalidRequestSessionId;
+ OnConnectionStateChanged(session_info,
+ PresentationConnectionStateChangeInfo(
+ PRESENTATION_CONNECTION_STATE_CONNECTED));
}
void PresentationServiceImpl::OnStartSessionError(
@@ -330,6 +333,9 @@ void PresentationServiceImpl::OnJoinSessionSucceeded(
blink::mojom::PresentationSessionInfo::From(session_info),
blink::mojom::PresentationErrorPtr())) {
ListenForConnectionStateChange(session_info);
+ OnConnectionStateChanged(session_info,
+ PresentationConnectionStateChangeInfo(
+ PRESENTATION_CONNECTION_STATE_CONNECTED));
}
}
@@ -421,6 +427,9 @@ void PresentationServiceImpl::Terminate(const GURL& presentation_url,
void PresentationServiceImpl::OnConnectionStateChanged(
const PresentationSessionInfo& connection,
const PresentationConnectionStateChangeInfo& info) {
+ DVLOG(2) << "PresentationServiceImpl::OnConnectionStateChanged "
+ << "[presentation_id]: " << connection.presentation_id
+ << " [state]: " << info.state;
DCHECK(client_.get());
if (info.state == PRESENTATION_CONNECTION_STATE_CLOSED) {
client_->OnConnectionClosed(
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698