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

Unified Diff: Source/web/FrameLoaderClientImpl.cpp

Issue 1055503002: Eliminate MediaPlayer & MediaPlayerClient abstractions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added separate interface for EncryptedMedia Created 5 years, 7 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: Source/web/FrameLoaderClientImpl.cpp
diff --git a/Source/web/FrameLoaderClientImpl.cpp b/Source/web/FrameLoaderClientImpl.cpp
index 1d11d8422acd09fe00b9c7fc9c6eb2d929c20fcb..4be1ec7d80761ba849c9d3d3dea24909531ae93d 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/layout/HitTestResult.h"
#include "core/loader/DocumentLoader.h"
#include "core/loader/FrameLoadRequest.h"
@@ -54,6 +55,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"
@@ -67,6 +69,7 @@
#include "platform/plugins/PluginData.h"
#include "public/platform/Platform.h"
#include "public/platform/WebApplicationCacheHost.h"
+#include "public/platform/WebMediaPlayer.h"
#include "public/platform/WebMimeRegistry.h"
#include "public/platform/WebRTCPeerConnectionHandler.h"
#include "public/platform/WebServiceWorkerProvider.h"
@@ -788,6 +791,20 @@ 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;
+ return adoptPtr(webFrame->client()->createMediaPlayer(webFrame, url, static_cast<WebMediaPlayerClient*>(htmlMediaElement),
ddorwin 2015/05/08 17:49:42 nit: Put this complex last parameter on its own li
Srirama 2015/05/19 10:39:47 Done.
+ &(HTMLMediaElementEncryptedMedia::from(*htmlMediaElement)),
+ HTMLMediaElementEncryptedMedia::contentDecryptionModule(*htmlMediaElement)));
ddorwin 2015/05/08 17:49:42 As noted at the definition, I think it makes sense
Srirama 2015/05/19 10:39:47 Done.
+}
+
ObjectContentType FrameLoaderClientImpl::objectContentType(
const KURL& url,
const String& explicitMimeType,

Powered by Google App Engine
This is Rietveld 408576698