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

Unified Diff: Source/modules/presentation/PresentationSession.cpp

Issue 1092193003: [PresentationAPI] Added on-session-text-message handler. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Forward declare WebString in WebPresentationController.h Created 5 years, 8 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: Source/modules/presentation/PresentationSession.cpp
diff --git a/Source/modules/presentation/PresentationSession.cpp b/Source/modules/presentation/PresentationSession.cpp
index b4a0ec9be96c6242083d4520e4ecc7d6442b1c0b..6c6e9380d43916753372d614e9046f7806214c83 100644
--- a/Source/modules/presentation/PresentationSession.cpp
+++ b/Source/modules/presentation/PresentationSession.cpp
@@ -10,6 +10,7 @@
#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
#include "core/events/Event.h"
+#include "core/events/MessageEvent.h"
#include "core/frame/LocalFrame.h"
#include "modules/EventTargetModules.h"
#include "modules/presentation/Presentation.h"
@@ -135,6 +136,11 @@ void PresentationSession::sendInternal(const uint8_t* data, size_t size, Excepti
controller->send(m_url, m_id, data, size);
}
+void PresentationSession::didReceiveTextMessage(const String& message)
+{
+ dispatchEvent(MessageEvent::create(message));
+}
+
void PresentationSession::close()
{
if (m_state != WebPresentationSessionState::Connected)
« no previous file with comments | « Source/modules/presentation/PresentationSession.h ('k') | public/platform/modules/presentation/WebPresentationController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698