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

Unified Diff: Source/modules/presentation/Presentation.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/Presentation.cpp
diff --git a/Source/modules/presentation/Presentation.cpp b/Source/modules/presentation/Presentation.cpp
index 0e470d6bc75f570accdb7035c48c0620ce362e4e..498b6d25b088a6717ba1c0e365f7dd9218e39db8 100644
--- a/Source/modules/presentation/Presentation.cpp
+++ b/Source/modules/presentation/Presentation.cpp
@@ -17,6 +17,7 @@
#include "modules/presentation/DefaultSessionStartEvent.h"
#include "modules/presentation/PresentationController.h"
#include "modules/presentation/PresentationSessionClientCallbacks.h"
+#include "public/platform/modules/presentation/WebPresentationSessionClient.h"
namespace blink {
@@ -156,6 +157,15 @@ void Presentation::registerSession(PresentationSession* session)
m_openSessions.add(session);
}
+PresentationSession* Presentation::findSession(WebPresentationSessionClient* sessionClient)
+{
+ for (auto it = m_openSessions.begin(); it != m_openSessions.end(); ++it) {
Peter Beverloo 2015/03/20 19:07:40 for (const auto& session : m_openSessions)
whywhat 2015/03/23 21:12:16 Done. I can't use a const iterator since I need to
+ if ((*it)->matches(sessionClient))
+ return it->get();
+ }
+ return nullptr;
+}
+
PresentationController* Presentation::presentationController()
{
if (!frame())

Powered by Google App Engine
This is Rietveld 408576698