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

Unified Diff: Source/core/html/HTMLVideoElement.cpp

Issue 291873002: Eliminate MediaPlayer & MediaPlayerClient abstractions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: updated as per the review comments Created 6 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
« no previous file with comments | « Source/core/html/HTMLVideoElement.h ('k') | Source/core/rendering/RenderVideo.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLVideoElement.cpp
diff --git a/Source/core/html/HTMLVideoElement.cpp b/Source/core/html/HTMLVideoElement.cpp
index a4e2c608f0bcc3b3d96c955f0e557763541993c6..7748b964d1893c7670773a8fea40ff6241c94855 100644
--- a/Source/core/html/HTMLVideoElement.cpp
+++ b/Source/core/html/HTMLVideoElement.cpp
@@ -134,16 +134,16 @@ bool HTMLVideoElement::supportsFullscreen() const
unsigned HTMLVideoElement::videoWidth() const
{
- if (!player())
+ if (!webMediaPlayer())
return 0;
- return player()->naturalSize().width();
+ return webMediaPlayer()->naturalSize().width;
}
unsigned HTMLVideoElement::videoHeight() const
{
- if (!player())
+ if (!webMediaPlayer())
return 0;
- return player()->naturalSize().height();
+ return webMediaPlayer()->naturalSize().height;
}
bool HTMLVideoElement::isURLAttribute(const Attribute& attribute) const
@@ -204,10 +204,10 @@ bool HTMLVideoElement::copyVideoTextureToPlatformTexture(blink::WebGraphicsConte
bool HTMLVideoElement::hasAvailableVideoFrame() const
{
- if (!player())
+ if (!webMediaPlayer())
return false;
- return player()->hasVideo() && player()->readyState() >= MediaPlayer::HaveCurrentData;
+ return webMediaPlayer()->hasVideo() && webMediaPlayer()->readyState() >= blink::WebMediaPlayer::ReadyStateHaveCurrentData;
}
void HTMLVideoElement::webkitEnterFullscreen(ExceptionState& exceptionState)
@@ -248,18 +248,18 @@ void HTMLVideoElement::didMoveToNewDocument(Document& oldDocument)
unsigned HTMLVideoElement::webkitDecodedFrameCount() const
{
- if (!player())
+ if (!webMediaPlayer())
return 0;
- return player()->decodedFrameCount();
+ return webMediaPlayer()->decodedFrameCount();
}
unsigned HTMLVideoElement::webkitDroppedFrameCount() const
{
- if (!player())
+ if (!webMediaPlayer())
return 0;
- return player()->droppedFrameCount();
+ return webMediaPlayer()->droppedFrameCount();
}
KURL HTMLVideoElement::posterImageURL() const
@@ -297,7 +297,7 @@ PassRefPtr<Image> HTMLVideoElement::getSourceImageForCanvas(SourceImageMode mode
bool HTMLVideoElement::wouldTaintOrigin(SecurityOrigin* destinationSecurityOrigin) const
{
- return !hasSingleSecurityOrigin() || (!(player() && player()->didPassCORSAccessCheck()) && destinationSecurityOrigin->taintsCanvas(currentSrc()));
+ return !hasSingleSecurityOrigin() || (!(webMediaPlayer() && webMediaPlayer()->didPassCORSAccessCheck()) && destinationSecurityOrigin->taintsCanvas(currentSrc()));
}
FloatSize HTMLVideoElement::sourceSize() const
« no previous file with comments | « Source/core/html/HTMLVideoElement.h ('k') | Source/core/rendering/RenderVideo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698