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

Unified Diff: content/renderer/presentation/presentation_dispatcher.cc

Issue 1522313003: [Cast,Android,Presentation API] Send messages back to the right clients, listen for messages sooner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed some null pointer exceptions Created 5 years 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 | « chrome/android/java/src/org/chromium/chrome/browser/media/router/cast/CreateRouteRequest.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/presentation/presentation_dispatcher.cc
diff --git a/content/renderer/presentation/presentation_dispatcher.cc b/content/renderer/presentation/presentation_dispatcher.cc
index d299c1abf019c3c9ce629ae781986b1f5dd04bed..268f1696dcae93a788f6c4d5f38eb9802207b487 100644
--- a/content/renderer/presentation/presentation_dispatcher.cc
+++ b/content/renderer/presentation/presentation_dispatcher.cc
@@ -346,9 +346,9 @@ void PresentationDispatcher::OnDefaultSessionStarted(
return;
if (!session_info.is_null()) {
+ presentation_service_->ListenForSessionMessages(session_info.Clone());
controller_->didStartDefaultSession(
- new PresentationConnectionClient(session_info.Clone()));
- presentation_service_->ListenForSessionMessages(session_info.Pass());
+ new PresentationConnectionClient(session_info.Pass()));
}
}
@@ -366,9 +366,9 @@ void PresentationDispatcher::OnSessionCreated(
}
DCHECK(!session_info.is_null());
+ presentation_service_->ListenForSessionMessages(session_info.Clone());
callback->onSuccess(blink::adoptWebPtr(
- new PresentationConnectionClient(session_info.Clone())));
- presentation_service_->ListenForSessionMessages(session_info.Pass());
+ new PresentationConnectionClient(session_info.Pass())));
}
void PresentationDispatcher::OnConnectionStateChanged(
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/media/router/cast/CreateRouteRequest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698