Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(291)

Side by Side Diff: Source/modules/presentation/PresentationController.cpp

Issue 1131463006: [PresentationAPI] Plumbing send(Blob) from PresentationSession IDL to platform/. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 m_client->sendString(presentationUrl, presentationId, message); 127 m_client->sendString(presentationUrl, presentationId, message);
128 } 128 }
129 129
130 void PresentationController::send(const String& presentationUrl, const String& p resentationId, const uint8_t* data, size_t length) 130 void PresentationController::send(const String& presentationUrl, const String& p resentationId, const uint8_t* data, size_t length)
131 { 131 {
132 if (!m_client) 132 if (!m_client)
133 return; 133 return;
134 m_client->sendArrayBuffer(presentationUrl, presentationId, data, length); 134 m_client->sendArrayBuffer(presentationUrl, presentationId, data, length);
135 } 135 }
136 136
137 void PresentationController::sendBlobData(const String& presentationUrl, const S tring& presentationId, const uint8_t* data, size_t length)
138 {
139 if (!m_client)
140 return;
141 m_client->sendBlobData(presentationUrl, presentationId, data, length);
142 }
143
137 void PresentationController::closeSession(const String& url, const String& prese ntationId) 144 void PresentationController::closeSession(const String& url, const String& prese ntationId)
138 { 145 {
139 if (!m_client) 146 if (!m_client)
140 return; 147 return;
141 m_client->closeSession(url, presentationId); 148 m_client->closeSession(url, presentationId);
142 } 149 }
143 150
144 void PresentationController::setPresentation(Presentation* presentation) 151 void PresentationController::setPresentation(Presentation* presentation)
145 { 152 {
146 m_presentation = presentation; 153 m_presentation = presentation;
147 } 154 }
148 155
149 void PresentationController::willDetachFrameHost() 156 void PresentationController::willDetachFrameHost()
150 { 157 {
151 if (m_client) { 158 if (m_client) {
152 m_client->setController(nullptr); 159 m_client->setController(nullptr);
153 m_client = nullptr; 160 m_client = nullptr;
154 } 161 }
155 } 162 }
156 163
157 } // namespace blink 164 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698