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

Unified Diff: third_party/WebKit/Source/modules/presentation/PresentationReceiver.cpp

Issue 2355723004: [Presentation API] 1-UA: send message between controller and receiver page (Closed)
Patch Set: Merge with changes in Issue 2343013002 Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/presentation/PresentationReceiver.cpp
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationReceiver.cpp b/third_party/WebKit/Source/modules/presentation/PresentationReceiver.cpp
index 2d235f5fb322c051c12c2a28d4df74c9743032c8..1811334795935f4c6fc68159756117379528e6ae 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationReceiver.cpp
+++ b/third_party/WebKit/Source/modules/presentation/PresentationReceiver.cpp
@@ -53,6 +53,26 @@ void PresentationReceiver::onReceiverConnectionAvailable(WebPresentationConnecti
m_connectionList->dispatchConnectionAvailableEvent(connection);
}
+void PresentationReceiver::didReceiveSessionTextMessage(WebPresentationConnectionClient* connectionClient, const WebString& message)
+{
+ std::unique_ptr<WebPresentationConnectionClient> client = wrapUnique(connectionClient);
+
+ PresentationConnection* connection = m_connectionList->findConnection(client.get());
+ if (!connection)
+ return;
+ connection->didReceiveTextMessage(message);
+}
+
+void PresentationReceiver::didReceiveSessionBinaryMessage(WebPresentationConnectionClient* connectionClient, const uint8_t* data, size_t length)
+{
+ std::unique_ptr<WebPresentationConnectionClient> client = wrapUnique(connectionClient);
+
+ PresentationConnection* connection = m_connectionList->findConnection(client.get());
+ if (!connection)
+ return;
+ connection->didReceiveBinaryMessage(data, length);
+}
+
void PresentationReceiver::registerConnection(PresentationConnection* connection)
{
DCHECK(m_connectionList);

Powered by Google App Engine
This is Rietveld 408576698