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

Unified Diff: Source/web/WebMediaPlayerClientImpl.cpp

Issue 131763011: Expose the poster image URL to WebMediaPlayer subclasses (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | public/platform/WebMediaPlayer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebMediaPlayerClientImpl.cpp
diff --git a/Source/web/WebMediaPlayerClientImpl.cpp b/Source/web/WebMediaPlayerClientImpl.cpp
index e843d48b68a88c29343955a3cd09b6ba56bcc5fb..78841ff9f41624ae55aac229e731ce073a1b3e9b 100644
--- a/Source/web/WebMediaPlayerClientImpl.cpp
+++ b/Source/web/WebMediaPlayerClientImpl.cpp
@@ -12,6 +12,7 @@
#include "WebViewImpl.h"
#include "core/frame/Frame.h"
#include "core/html/HTMLMediaElement.h"
+#include "core/html/HTMLVideoElement.h"
#include "core/html/TimeRanges.h"
#include "core/rendering/RenderLayerCompositor.h"
#include "core/rendering/RenderView.h"
@@ -228,6 +229,7 @@ void WebMediaPlayerClientImpl::loadInternal()
// FIXME: Remove this cast
Frame* frame = static_cast<HTMLMediaElement*>(m_client)->document().frame();
+ WebURL poster = static_cast<HTMLVideoElement*>(m_client)->posterImageURL();
// This does not actually check whether the hardware can support accelerated
// compositing, but only if the flag is set. However, this is checked lazily
@@ -242,6 +244,10 @@ void WebMediaPlayerClientImpl::loadInternal()
m_audioSourceProvider.wrap(m_webMediaPlayer->audioSourceProvider());
#endif
+ if (!poster.isEmpty()) {
whywhat 2014/02/04 15:51:58 nit: you don't need the curly braces for a one-lin
+ m_webMediaPlayer->setPoster(poster);
+ }
+
// Tell WebMediaPlayer about any connected CDM (may be null).
m_webMediaPlayer->setContentDecryptionModule(m_cdm);
« no previous file with comments | « no previous file | public/platform/WebMediaPlayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698