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

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

Issue 2340433003: [Presentation API] 1-UA: notify receiver page when receiver connection becomes available (blink sid… (Closed)
Patch Set: resolve code review comments from dcheng 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 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()

Powered by Google App Engine
This is Rietveld 408576698