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 567ae044fedb7a9a68b12a12e2d1d6744456def4..2d235f5fb322c051c12c2a28d4df74c9743032c8 100644 |
--- a/third_party/WebKit/Source/modules/presentation/PresentationReceiver.cpp |
+++ b/third_party/WebKit/Source/modules/presentation/PresentationReceiver.cpp |
@@ -12,13 +12,17 @@ |
#include "core/frame/LocalFrame.h" |
#include "modules/presentation/PresentationConnection.h" |
#include "modules/presentation/PresentationConnectionList.h" |
+#include "public/platform/modules/presentation/WebPresentationClient.h" |
namespace blink { |
-PresentationReceiver::PresentationReceiver(LocalFrame* frame) |
+PresentationReceiver::PresentationReceiver(LocalFrame* frame, WebPresentationClient* client) |
: DOMWindowProperty(frame) |
{ |
m_connectionList = new PresentationConnectionList(frame->document()); |
+ |
+ if (client) |
+ client->setReceiver(this); |
} |
ScriptPromise PresentationReceiver::connectionList(ScriptState* scriptState) |
@@ -32,7 +36,7 @@ ScriptPromise PresentationReceiver::connectionList(ScriptState* scriptState) |
return m_connectionListProperty->promise(scriptState->world()); |
} |
-void PresentationReceiver::onConnectionReceived(WebPresentationConnectionClient* connectionClient) |
+void PresentationReceiver::onReceiverConnectionAvailable(WebPresentationConnectionClient* connectionClient) |
{ |
DCHECK(connectionClient); |
// take() will call PresentationReceiver::registerConnection() |