Index: Source/web/FrameLoaderClientImpl.cpp |
diff --git a/Source/web/FrameLoaderClientImpl.cpp b/Source/web/FrameLoaderClientImpl.cpp |
index 117a1781b35de6c09bc334ba962a887de1ce5c74..ff67ca3c273ba97a8a5c8adc010a36b5897a0c88 100644 |
--- a/Source/web/FrameLoaderClientImpl.cpp |
+++ b/Source/web/FrameLoaderClientImpl.cpp |
@@ -42,6 +42,7 @@ |
#include "core/frame/FrameView.h" |
#include "core/frame/Settings.h" |
#include "core/html/HTMLAppletElement.h" |
+#include "core/html/HTMLMediaElement.h" |
#include "core/input/EventHandler.h" |
#include "core/layout/HitTestResult.h" |
#include "core/loader/DocumentLoader.h" |
@@ -53,6 +54,7 @@ |
#include "modules/device_light/DeviceLightController.h" |
#include "modules/device_orientation/DeviceMotionController.h" |
#include "modules/device_orientation/DeviceOrientationController.h" |
+#include "modules/encryptedmedia/HTMLMediaElementEncryptedMedia.h" |
#include "modules/gamepad/NavigatorGamepad.h" |
#include "modules/serviceworkers/NavigatorServiceWorker.h" |
#include "modules/storage/DOMWindowStorageController.h" |
@@ -777,6 +779,22 @@ PassRefPtrWillBeRawPtr<Widget> FrameLoaderClientImpl::createJavaAppletWidget( |
"application/x-java-applet", false, FailOnDetachedPlugin); |
} |
+PassOwnPtr<WebMediaPlayer> FrameLoaderClientImpl::createWebMediaPlayer( |
+ HTMLMediaElement* htmlMediaElement, |
+ const WebURL& url) |
+{ |
+ WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame( |
+ htmlMediaElement->document().frame()); |
+ |
+ if (!webFrame || !webFrame->client()) |
+ return nullptr; |
+ |
+ HTMLMediaElementEncryptedMedia& encryptedMedia = HTMLMediaElementEncryptedMedia::from(*htmlMediaElement); |
+ return adoptPtr(webFrame->client()->createMediaPlayer(webFrame, url, |
+ htmlMediaElement, |
+ &encryptedMedia, encryptedMedia.contentDecryptionModule())); |
+} |
+ |
ObjectContentType FrameLoaderClientImpl::objectContentType( |
const KURL& url, |
const String& explicitMimeType, |