| 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 "public/platform/modules/presentation/WebPresentationClient.h" | 9 #include "public/platform/modules/presentation/WebPresentationClient.h" |
| 10 | 10 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 return false; | 67 return false; |
| 68 return m_presentation->isAvailableChangeWatched(); | 68 return m_presentation->isAvailableChangeWatched(); |
| 69 } | 69 } |
| 70 | 70 |
| 71 void PresentationController::updateAvailableChangeWatched(bool watched) | 71 void PresentationController::updateAvailableChangeWatched(bool watched) |
| 72 { | 72 { |
| 73 if (m_client) | 73 if (m_client) |
| 74 m_client->updateAvailableChangeWatched(watched); | 74 m_client->updateAvailableChangeWatched(watched); |
| 75 } | 75 } |
| 76 | 76 |
| 77 void PresentationController::startSession(const String& presentationUrl, const S
tring& presentationId, WebPresentationSessionClientCallbacks* callbacks) |
| 78 { |
| 79 if (!m_client) { |
| 80 delete callbacks; |
| 81 return; |
| 82 } |
| 83 m_client->startSession(presentationUrl, presentationId, callbacks); |
| 84 } |
| 85 |
| 86 void PresentationController::joinSession(const String& presentationUrl, const St
ring& presentationId, WebPresentationSessionClientCallbacks* callbacks) |
| 87 { |
| 88 if (!m_client) { |
| 89 delete callbacks; |
| 90 return; |
| 91 } |
| 92 m_client->joinSession(presentationUrl, presentationId, callbacks); |
| 93 } |
| 94 |
| 77 void PresentationController::setPresentation(Presentation* presentation) | 95 void PresentationController::setPresentation(Presentation* presentation) |
| 78 { | 96 { |
| 79 m_presentation = presentation; | 97 m_presentation = presentation; |
| 80 } | 98 } |
| 81 | 99 |
| 82 void PresentationController::willDetachFrameHost() | 100 void PresentationController::willDetachFrameHost() |
| 83 { | 101 { |
| 84 if (m_client) { | 102 if (m_client) { |
| 85 m_client->setController(nullptr); | 103 m_client->setController(nullptr); |
| 86 m_client = nullptr; | 104 m_client = nullptr; |
| 87 } | 105 } |
| 88 } | 106 } |
| 89 | 107 |
| 90 } // namespace blink | 108 } // namespace blink |
| OLD | NEW |