Index: third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp |
diff --git a/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp b/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp |
index a954edf5bf42f080c9da7b9dc9fccdc2685f55f1..cd7c992dcdeb67a1bea20f81da9bc991d5dda42e 100644 |
--- a/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp |
+++ b/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp |
@@ -58,6 +58,7 @@ |
#include "modules/device_orientation/DeviceOrientationController.h" |
#include "modules/encryptedmedia/HTMLMediaElementEncryptedMedia.h" |
#include "modules/gamepad/NavigatorGamepad.h" |
+#include "modules/mediasession/HTMLMediaElementMediaSession.h" |
#include "modules/mediasession/MediaSession.h" |
#include "modules/serviceworkers/NavigatorServiceWorker.h" |
#include "modules/storage/DOMWindowStorageController.h" |
@@ -801,11 +802,15 @@ PassOwnPtr<WebMediaPlayer> FrameLoaderClientImpl::createWebMediaPlayer( |
if (!webFrame || !webFrame->client()) |
return nullptr; |
+ WebMediaSession* webMediaSession = nullptr; |
+ if (MediaSession* session = HTMLMediaElementMediaSession::session(htmlMediaElement)) |
+ webMediaSession = session->webMediaSession(); |
+ |
HTMLMediaElementEncryptedMedia& encryptedMedia = HTMLMediaElementEncryptedMedia::from(htmlMediaElement); |
WebString sinkId(HTMLMediaElementAudioOutputDevice::sinkId(htmlMediaElement)); |
return adoptPtr(webFrame->client()->createMediaPlayer(webFrame, url, |
client, &encryptedMedia, |
- encryptedMedia.contentDecryptionModule(), sinkId)); |
+ encryptedMedia.contentDecryptionModule(), sinkId, webMediaSession)); |
} |
PassOwnPtr<WebMediaSession> FrameLoaderClientImpl::createWebMediaSession() |