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

Unified Diff: third_party/WebKit/Source/modules/presentation/Presentation.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 mlamouri 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/Presentation.cpp
diff --git a/third_party/WebKit/Source/modules/presentation/Presentation.cpp b/third_party/WebKit/Source/modules/presentation/Presentation.cpp
index d20a52919ae54a9f4886c00058428d9b6c77c0a1..649a4d4e8065c0f636bbb613c9661fd56f2305e7 100644
--- a/third_party/WebKit/Source/modules/presentation/Presentation.cpp
+++ b/third_party/WebKit/Source/modules/presentation/Presentation.cpp
@@ -56,11 +56,13 @@ void Presentation::setDefaultRequest(PresentationRequest* request)
PresentationReceiver* Presentation::receiver()
{
+ PresentationController* controller = PresentationController::from(*frame());
+ auto client = controller ? controller->client() : nullptr;
mark a. foltz 2016/09/15 16:53:18 It looks like this can only be nullptr if Presenta
zhaobin 2016/09/15 18:56:03 Acknowledged.
// TODO(mlamouri): only return something if the Blink instance is running in
// presentation receiver mode. The flag PresentationReceiver could be used
// for that.
mark a. foltz 2016/09/15 16:53:18 We need to actually do this to match spec; navigat
zhaobin 2016/09/15 18:56:03 Done.
if (!m_receiver)
- m_receiver = new PresentationReceiver(frame());
+ m_receiver = new PresentationReceiver(frame(), client);
return m_receiver;
}

Powered by Google App Engine
This is Rietveld 408576698