HTMLVideoElement.h [plain text]
#ifndef HTMLVideoElement_h
#define HTMLVideoElement_h
#if ENABLE(VIDEO)
#include "HTMLMediaElement.h"
namespace WebCore {
class HTMLImageLoader;
class HTMLVideoElement FINAL : public HTMLMediaElement {
public:
static PassRefPtr<HTMLVideoElement> create(const QualifiedName&, Document*, bool);
unsigned width() const;
unsigned height() const;
unsigned videoWidth() const;
unsigned videoHeight() const;
void webkitEnterFullscreen(ExceptionCode&);
void webkitExitFullscreen();
bool webkitSupportsFullscreen();
bool webkitDisplayingFullscreen();
void webkitEnterFullScreen(ExceptionCode& ec) { webkitEnterFullscreen(ec); }
void webkitExitFullScreen() { webkitExitFullscreen(); }
#if ENABLE(MEDIA_STATISTICS)
unsigned webkitDecodedFrameCount() const;
unsigned webkitDroppedFrameCount() const;
#endif
void paintCurrentFrameInContext(GraphicsContext*, const IntRect&);
bool copyVideoTextureToPlatformTexture(GraphicsContext3D*, Platform3DObject texture, GC3Dint level, GC3Denum type, GC3Denum internalFormat, bool premultiplyAlpha, bool flipY);
bool shouldDisplayPosterImage() const { return displayMode() == Poster || displayMode() == PosterWaitingForVideo; }
KURL posterImageURL() const;
private:
HTMLVideoElement(const QualifiedName&, Document*, bool);
virtual bool rendererIsNeeded(const NodeRenderingContext&);
#if !ENABLE(PLUGIN_PROXY_FOR_VIDEO)
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
#endif
virtual void attach(const AttachContext& = AttachContext()) OVERRIDE;
virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStylePropertySet*) OVERRIDE;
virtual bool isVideo() const { return true; }
virtual bool hasVideo() const { return player() && player()->hasVideo(); }
virtual bool supportsFullscreen() const;
virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
virtual const AtomicString& imageSourceURL() const OVERRIDE;
virtual bool hasAvailableVideoFrame() const;
virtual void updateDisplayState();
virtual void didMoveToNewDocument(Document* oldDocument) OVERRIDE;
virtual void setDisplayMode(DisplayMode);
OwnPtr<HTMLImageLoader> m_imageLoader;
AtomicString m_defaultPosterURL;
};
}
#endif
#endif