Chromium Code Reviews| Index: Source/modules/presentation/PresentationSession.cpp |
| diff --git a/Source/modules/presentation/PresentationSession.cpp b/Source/modules/presentation/PresentationSession.cpp |
| index 03ac8d4cb0c029fe14854bc4e4bdaa7b1d9f7dd3..17d11d37fbae0a849476113209118d1de45028bf 100644 |
| --- a/Source/modules/presentation/PresentationSession.cpp |
| +++ b/Source/modules/presentation/PresentationSession.cpp |
| @@ -9,6 +9,7 @@ |
| #include "core/frame/LocalFrame.h" |
| #include "modules/EventTargetModules.h" |
| #include "modules/presentation/Presentation.h" |
| +#include "modules/presentation/PresentationController.h" |
| #include "public/platform/WebString.h" |
| #include "public/platform/modules/presentation/WebPresentationSessionClient.h" |
| #include "wtf/OwnPtr.h" |
| @@ -67,6 +68,17 @@ void PresentationSession::postMessage(const String& message) |
| void PresentationSession::close() |
| { |
| + PresentationController* controller = presentationController(); |
| + if (controller) { |
|
whywhat
2015/03/17 23:35:19
nit: remove the braces
haibinlu
2015/03/18 00:58:22
Done.
|
| + controller->closeSession(m_id); |
| + } |
| +} |
| + |
| +PresentationController* PresentationSession::presentationController() |
| +{ |
| + if (!frame()) |
| + return nullptr; |
| + return PresentationController::from(*frame()); |
| } |
| } // namespace blink |