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

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

Issue 1585163002: Media Session: prepare for implicit activation of user created session (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add parameter names, also for unused variables Created 4 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/web/FrameLoaderClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp b/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
index 167b3807b3fc283d8f40ee9979b54104698730aa..00a0aef6178a9efacf836c1e00b5c65b42ffd400 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"
@@ -818,11 +819,15 @@ PassOwnPtr<WebMediaPlayer> FrameLoaderClientImpl::createWebMediaPlayer(
if (!webFrame || !webFrame->client())
return nullptr;
+ WebMediaSession* webMediaSession = nullptr;
+ if (MediaSession* mediaSession = HTMLMediaElementMediaSession::session(htmlMediaElement))
+ webMediaSession = mediaSession->webMediaSession();
+
HTMLMediaElementEncryptedMedia& encryptedMedia = HTMLMediaElementEncryptedMedia::from(htmlMediaElement);
WebString sinkId(HTMLMediaElementAudioOutputDevice::sinkId(htmlMediaElement));
return adoptPtr(webFrame->client()->createMediaPlayer(webFrame, loadType, url,
client, &encryptedMedia,
- encryptedMedia.contentDecryptionModule(), sinkId));
+ encryptedMedia.contentDecryptionModule(), sinkId, webMediaSession));
}
PassOwnPtr<WebMediaSession> FrameLoaderClientImpl::createWebMediaSession()
« no previous file with comments | « third_party/WebKit/Source/modules/mediasession/MediaSession.h ('k') | third_party/WebKit/public/web/WebFrameClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698