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

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

Issue 2471263003: [Presentation API] (4th)(1-UA blink side) Add WebPresentationConnection and WebPresentationConnecti… (Closed)
Patch Set: resolve code review comments from mlamouri Created 3 years, 11 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 aa15f6757e5519fb5445f5056d7a7f0b84bcb0c8..d7097b9a0f18dc66eef472f7e884c97ed3cae1eb 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationReceiver.cpp
+++ b/third_party/WebKit/Source/modules/presentation/PresentationReceiver.cpp
@@ -39,7 +39,7 @@ ScriptPromise PresentationReceiver::connectionList(ScriptState* scriptState) {
return m_connectionListProperty->promise(scriptState->world());
}
-void PresentationReceiver::onReceiverConnectionAvailable(
+WebPresentationConnection* PresentationReceiver::onReceiverConnectionAvailable(
const WebPresentationSessionInfo& sessionInfo) {
// take() will call PresentationReceiver::registerConnection()
// and register the connection.
@@ -47,7 +47,7 @@ void PresentationReceiver::onReceiverConnectionAvailable(
// receiver.connectionList property not accessed
if (!m_connectionListProperty)
- return;
+ return nullptr;
if (m_connectionListProperty->getState() ==
ScriptPromisePropertyBase::Pending)
@@ -55,6 +55,8 @@ void PresentationReceiver::onReceiverConnectionAvailable(
else if (m_connectionListProperty->getState() ==
ScriptPromisePropertyBase::Resolved)
m_connectionList->dispatchConnectionAvailableEvent(connection);
+
+ return connection;
}
void PresentationReceiver::registerConnection(

Powered by Google App Engine
This is Rietveld 408576698