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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 void PresentationController::didReceiveSessionTextMessage(WebPresentationSession
Client* sessionClient, const WebString& message) | 85 void PresentationController::didReceiveSessionTextMessage(WebPresentationSession
Client* sessionClient, const WebString& message) |
86 { | 86 { |
87 if (!m_presentation) { | 87 if (!m_presentation) { |
88 delete sessionClient; | 88 delete sessionClient; |
89 return; | 89 return; |
90 } | 90 } |
91 | 91 |
92 m_presentation->didReceiveSessionTextMessage(sessionClient, message); | 92 m_presentation->didReceiveSessionTextMessage(sessionClient, message); |
93 } | 93 } |
94 | 94 |
| 95 void PresentationController::didReceiveSessionBinaryMessage(WebPresentationSessi
onClient* sessionClient, const uint8_t* data, size_t length) |
| 96 { |
| 97 if (!m_presentation) { |
| 98 delete sessionClient; |
| 99 return; |
| 100 } |
| 101 |
| 102 m_presentation->didReceiveSessionBinaryMessage(sessionClient, data, length); |
| 103 } |
| 104 |
95 void PresentationController::setPresentation(Presentation* presentation) | 105 void PresentationController::setPresentation(Presentation* presentation) |
96 { | 106 { |
97 m_presentation = presentation; | 107 m_presentation = presentation; |
98 } | 108 } |
99 | 109 |
100 void PresentationController::willDetachFrameHost() | 110 void PresentationController::willDetachFrameHost() |
101 { | 111 { |
102 if (m_client) { | 112 if (m_client) { |
103 m_client->setController(nullptr); | 113 m_client->setController(nullptr); |
104 m_client = nullptr; | 114 m_client = nullptr; |
105 } | 115 } |
106 } | 116 } |
107 | 117 |
108 } // namespace blink | 118 } // namespace blink |
OLD | NEW |