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 m_client->startSession(presentationUrl, presentationId, callbacks); | |
mlamouri (slow - plz ping)
2015/02/25 20:51:06
Hmm, sorry for realizing that now, but you have to
whywhat
2015/02/25 21:04:14
I start thinking I need a ref-counted pointer here
mlamouri (slow - plz ping)
2015/02/25 21:08:54
There is no ref pointer that crosses Blink/Chromiu
whywhat
2015/02/25 22:46:51
Something simple like std::unique_ptr would work i
| |
81 } | |
82 | |
83 void PresentationController::joinSession(const String& presentationUrl, const St ring& presentationId, WebPresentationSessionClientCallbacks* callbacks) | |
84 { | |
85 if (m_client) | |
86 m_client->joinSession(presentationUrl, presentationId, callbacks); | |
mlamouri (slow - plz ping)
2015/02/25 20:51:06
ditto
whywhat
2015/02/25 22:46:52
Done.
| |
87 } | |
88 | |
77 void PresentationController::setPresentation(Presentation* presentation) | 89 void PresentationController::setPresentation(Presentation* presentation) |
78 { | 90 { |
79 m_presentation = presentation; | 91 m_presentation = presentation; |
80 } | 92 } |
81 | 93 |
82 void PresentationController::willDetachFrameHost() | 94 void PresentationController::willDetachFrameHost() |
83 { | 95 { |
84 if (m_client) { | 96 if (m_client) { |
85 m_client->setController(nullptr); | 97 m_client->setController(nullptr); |
86 m_client = nullptr; | 98 m_client = nullptr; |
87 } | 99 } |
88 } | 100 } |
89 | 101 |
90 } // namespace blink | 102 } // namespace blink |
OLD | NEW |