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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 m_client->updateAvailableChangeWatched(watched); | 75 m_client->updateAvailableChangeWatched(watched); |
76 } | 76 } |
77 | 77 |
78 void PresentationController::didStartDefaultSession(WebPresentationSessionClient
* sessionClient) | 78 void PresentationController::didStartDefaultSession(WebPresentationSessionClient
* sessionClient) |
79 { | 79 { |
80 if (!m_presentation) { | 80 if (!m_presentation) { |
81 PresentationSession::dispose(sessionClient); | 81 PresentationSession::dispose(sessionClient); |
82 return; | 82 return; |
83 } | 83 } |
84 | 84 |
85 PresentationSession* session = PresentationSession::take(sessionClient, m_pr
esentation); | 85 PresentationSession* session = PresentationSession::take(sessionClient, m_pr
esentation, WebPresentationSessionState::Connected); |
86 m_presentation->didStartDefaultSession(session); | 86 m_presentation->didStartDefaultSession(session); |
87 } | 87 } |
88 | 88 |
89 void PresentationController::didChangeSessionState(WebPresentationSessionClient*
sessionClient, WebPresentationSessionState state) | 89 void PresentationController::didChangeSessionState(WebPresentationSessionClient*
sessionClient, WebPresentationSessionState state) |
90 { | 90 { |
91 if (m_presentation) | 91 if (m_presentation) |
92 m_presentation->didChangeSessionState(sessionClient, state); | 92 m_presentation->didChangeSessionState(sessionClient, state); |
93 else | 93 else |
94 PresentationSession::dispose(sessionClient); | 94 PresentationSession::dispose(sessionClient); |
95 } | 95 } |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 155 |
156 void PresentationController::willDetachFrameHost() | 156 void PresentationController::willDetachFrameHost() |
157 { | 157 { |
158 if (m_client) { | 158 if (m_client) { |
159 m_client->setController(nullptr); | 159 m_client->setController(nullptr); |
160 m_client = nullptr; | 160 m_client = nullptr; |
161 } | 161 } |
162 } | 162 } |
163 | 163 |
164 } // namespace blink | 164 } // namespace blink |
OLD | NEW |