| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 #include "modules/presentation/PresentationController.h" | 6 #include "modules/presentation/PresentationController.h" |
| 7 | 7 |
| 8 #include "core/frame/LocalFrame.h" | 8 #include "core/frame/LocalFrame.h" |
| 9 #include "modules/presentation/PresentationSession.h" | 9 #include "modules/presentation/PresentationSession.h" |
| 10 #include "public/platform/modules/presentation/WebPresentationClient.h" | 10 #include "public/platform/modules/presentation/WebPresentationClient.h" |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 97 |
| 98 void PresentationController::joinSession(const String& presentationUrl, const St
ring& presentationId, WebPresentationSessionClientCallbacks* callbacks) | 98 void PresentationController::joinSession(const String& presentationUrl, const St
ring& presentationId, WebPresentationSessionClientCallbacks* callbacks) |
| 99 { | 99 { |
| 100 if (!m_client) { | 100 if (!m_client) { |
| 101 delete callbacks; | 101 delete callbacks; |
| 102 return; | 102 return; |
| 103 } | 103 } |
| 104 m_client->joinSession(presentationUrl, presentationId, callbacks); | 104 m_client->joinSession(presentationUrl, presentationId, callbacks); |
| 105 } | 105 } |
| 106 | 106 |
| 107 void PresentationController::closeSession(const String& url, const String& prese
ntationId) |
| 108 { |
| 109 if (!m_client) |
| 110 return; |
| 111 m_client->closeSession(url, presentationId); |
| 112 } |
| 113 |
| 107 void PresentationController::setPresentation(Presentation* presentation) | 114 void PresentationController::setPresentation(Presentation* presentation) |
| 108 { | 115 { |
| 109 m_presentation = presentation; | 116 m_presentation = presentation; |
| 110 } | 117 } |
| 111 | 118 |
| 112 void PresentationController::willDetachFrameHost() | 119 void PresentationController::willDetachFrameHost() |
| 113 { | 120 { |
| 114 if (m_client) { | 121 if (m_client) { |
| 115 m_client->setController(nullptr); | 122 m_client->setController(nullptr); |
| 116 m_client = nullptr; | 123 m_client = nullptr; |
| 117 } | 124 } |
| 118 } | 125 } |
| 119 | 126 |
| 120 } // namespace blink | 127 } // namespace blink |
| OLD | NEW |