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

Unified Diff: Source/modules/presentation/PresentationController.cpp

Issue 1020303004: [PresentationAPI] Plumbing |onstatechange| event for the PresentationSession from Blink to platform/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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: Source/modules/presentation/PresentationController.cpp
diff --git a/Source/modules/presentation/PresentationController.cpp b/Source/modules/presentation/PresentationController.cpp
index e16165776cef9fd356f81d69ab16fe8a0e5a526e..7f134cb196984e7157773556c1091b474c9b9c9f 100644
--- a/Source/modules/presentation/PresentationController.cpp
+++ b/Source/modules/presentation/PresentationController.cpp
@@ -86,6 +86,17 @@ void PresentationController::didStartDefaultSession(WebPresentationSessionClient
m_presentation->didStartDefaultSession(session);
}
+void PresentationController::didChangeSessionState(WebPresentationSessionClient* sessionClient, WebPresentationSessionClient::SessionState state)
+{
+ if (m_presentation) {
+ PresentationSession* session = m_presentation->findSession(sessionClient);
Peter Beverloo 2015/03/20 19:07:40 Do you expect more events following this paradigm?
whywhat 2015/03/23 21:12:16 Yes, there will be at least an event about receivi
+ if (session)
+ session->didChangeState(state);
+ }
+
+ PresentationSession::dispose(sessionClient);
+}
+
void PresentationController::startSession(const String& presentationUrl, const String& presentationId, WebPresentationSessionClientCallbacks* callbacks)
{
if (!m_client) {

Powered by Google App Engine
This is Rietveld 408576698