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

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: rebase with master 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..49ef4301d8567404270b4b4b5cd691ddb5e0d80f 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()
{
- // TODO(mlamouri): only return something if the Blink instance is running in
+ PresentationController* controller = PresentationController::from(*frame());
+ auto client = controller ? controller->client() : nullptr;
dcheng 2016/09/28 23:55:13 Nit: auto*
zhaobin 2016/09/29 18:38:53 Done.
+ // TODO(crbug.com/647296): only return something if the Blink instance is running in
// presentation receiver mode. The flag PresentationReceiver could be used
// for that.
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