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

Unified Diff: third_party/WebKit/Source/web/LocalFrameClientImpl.cpp

Issue 2801823003: [Presentation API] Change connection to 'connected' if start a presentation with "https://www.googl… (Closed)
Patch Set: fix windows compile error Created 3 years, 8 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
« no previous file with comments | « third_party/WebKit/Source/modules/presentation/PresentationReceiver.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/LocalFrameClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/LocalFrameClientImpl.cpp b/third_party/WebKit/Source/web/LocalFrameClientImpl.cpp
index 02f40a824fd63997ee98b8456337533ab5d8ba11..13c62d2c2e5f6822d854dcb099eaae1be920427f 100644
--- a/third_party/WebKit/Source/web/LocalFrameClientImpl.cpp
+++ b/third_party/WebKit/Source/web/LocalFrameClientImpl.cpp
@@ -59,6 +59,7 @@
#include "modules/device_orientation/DeviceOrientationController.h"
#include "modules/encryptedmedia/HTMLMediaElementEncryptedMedia.h"
#include "modules/gamepad/NavigatorGamepad.h"
+#include "modules/presentation/PresentationReceiver.h"
#include "modules/remoteplayback/HTMLMediaElementRemotePlayback.h"
#include "modules/remoteplayback/RemotePlayback.h"
#include "modules/serviceworkers/NavigatorServiceWorker.h"
@@ -159,6 +160,11 @@ void LocalFrameClientImpl::DispatchDidClearWindowObjectInMainWorld() {
if (RuntimeEnabledFeatures::webVREnabled() ||
OriginTrials::webVREnabled(document->GetExecutionContext()))
NavigatorVR::From(*document);
+ if (RuntimeEnabledFeatures::presentationEnabled() &&
+ web_frame_->GetFrame()->GetSettings()->GetPresentationReceiver()) {
+ // Call this in order to ensure the object is created.
+ PresentationReceiver::From(*document);
+ }
}
}
// FIXME: when extensions go out of process, this whole concept stops working.
« no previous file with comments | « third_party/WebKit/Source/modules/presentation/PresentationReceiver.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698