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

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: PAGE_SCOPED always returns false. 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
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());
imcheng 2015/12/15 23:42:32 This change is probably OK for desktop. As I menti
whywhat 2015/12/16 12:31:20 It seems to pass all the tests at least :) Do you
imcheng 2015/12/16 19:24:36 Yeah, PresentationServiceImpl will call back into
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(

Powered by Google App Engine
This is Rietveld 408576698