Chromium Code Reviews| 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()) |