| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef HTMLVideoElement_h | 26 #ifndef HTMLVideoElement_h |
| 27 #define HTMLVideoElement_h | 27 #define HTMLVideoElement_h |
| 28 | 28 |
| 29 #include "core/html/HTMLMediaElement.h" | 29 #include "core/html/HTMLMediaElement.h" |
| 30 #include "core/html/canvas/CanvasImageSource.h" | 30 #include "core/html/canvas/CanvasImageSource.h" |
| 31 #include "platform/graphics/GraphicsTypes3D.h" |
| 31 | 32 |
| 32 namespace blink { | 33 namespace blink { |
| 33 class WebGraphicsContext3D; | 34 class WebGraphicsContext3D; |
| 34 } | 35 } |
| 35 | 36 |
| 36 namespace blink { | 37 namespace blink { |
| 37 | 38 |
| 38 class ExceptionState; | 39 class ExceptionState; |
| 39 class HTMLImageLoader; | 40 class HTMLImageLoader; |
| 41 class GraphicsContext; |
| 42 |
| 43 // GL types as defined in OpenGL ES 2.0 header file gl2.h from khronos.org. |
| 44 // That header cannot be included directly due to a conflict with NPAPI headers. |
| 45 // See crbug.com/328085. |
| 46 typedef unsigned GLenum; |
| 47 typedef int GC3Dint; |
| 40 | 48 |
| 41 class HTMLVideoElement FINAL : public HTMLMediaElement, public CanvasImageSource
{ | 49 class HTMLVideoElement FINAL : public HTMLMediaElement, public CanvasImageSource
{ |
| 42 public: | 50 public: |
| 43 static PassRefPtrWillBeRawPtr<HTMLVideoElement> create(Document&); | 51 static PassRefPtrWillBeRawPtr<HTMLVideoElement> create(Document&); |
| 44 virtual void trace(Visitor*) OVERRIDE; | 52 virtual void trace(Visitor*) OVERRIDE; |
| 45 | 53 |
| 46 unsigned videoWidth() const; | 54 unsigned videoWidth() const; |
| 47 unsigned videoHeight() const; | 55 unsigned videoHeight() const; |
| 48 | 56 |
| 49 // Fullscreen | 57 // Fullscreen |
| 50 void webkitEnterFullscreen(ExceptionState&); | 58 void webkitEnterFullscreen(ExceptionState&); |
| 51 void webkitExitFullscreen(); | 59 void webkitExitFullscreen(); |
| 52 bool webkitSupportsFullscreen(); | 60 bool webkitSupportsFullscreen(); |
| 53 bool webkitDisplayingFullscreen(); | 61 bool webkitDisplayingFullscreen(); |
| 54 | 62 |
| 55 // Statistics | 63 // Statistics |
| 56 unsigned webkitDecodedFrameCount() const; | 64 unsigned webkitDecodedFrameCount() const; |
| 57 unsigned webkitDroppedFrameCount() const; | 65 unsigned webkitDroppedFrameCount() const; |
| 58 | 66 |
| 59 // Used by canvas to gain raw pixel access | 67 // Used by canvas to gain raw pixel access |
| 60 void paintCurrentFrameInContext(GraphicsContext*, const IntRect&) const; | 68 void paintCurrentFrameInContext(GraphicsContext*, const IntRect&) const; |
| 61 | 69 |
| 62 // Used by WebGL to do GPU-GPU textures copy if possible. | 70 // Used by WebGL to do GPU-GPU textures copy if possible. |
| 63 // See more details at MediaPlayer::copyVideoTextureToPlatformTexture() defi
ned in Source/WebCore/platform/graphics/MediaPlayer.h. | 71 // See more details at MediaPlayer::copyVideoTextureToPlatformTexture() defi
ned in Source/WebCore/platform/graphics/MediaPlayer.h. |
| 64 bool copyVideoTextureToPlatformTexture(blink::WebGraphicsContext3D*, Platfor
m3DObject texture, GC3Dint level, GC3Denum type, GC3Denum internalFormat, bool p
remultiplyAlpha, bool flipY); | 72 bool copyVideoTextureToPlatformTexture(WebGraphicsContext3D*, Platform3DObje
ct texture, GC3Dint level, GLenum internalFormat, GLenum type, bool premultiplyA
lpha, bool flipY); |
| 65 | 73 |
| 66 bool shouldDisplayPosterImage() const { return displayMode() == Poster || di
splayMode() == PosterWaitingForVideo; } | 74 bool shouldDisplayPosterImage() const { return displayMode() == Poster || di
splayMode() == PosterWaitingForVideo; } |
| 67 | 75 |
| 68 KURL posterImageURL() const; | 76 KURL posterImageURL() const; |
| 69 | 77 |
| 70 // FIXME: Remove this when WebMediaPlayerClientImpl::loadInternal does not d
epend on it. | 78 // FIXME: Remove this when WebMediaPlayerClientImpl::loadInternal does not d
epend on it. |
| 71 virtual KURL mediaPlayerPosterURL() OVERRIDE; | 79 virtual KURL mediaPlayerPosterURL() OVERRIDE; |
| 72 | 80 |
| 73 // CanvasImageSource implementation | 81 // CanvasImageSource implementation |
| 74 virtual PassRefPtr<Image> getSourceImageForCanvas(SourceImageMode, SourceIma
geStatus*) const OVERRIDE; | 82 virtual PassRefPtr<Image> getSourceImageForCanvas(SourceImageMode, SourceIma
geStatus*) const OVERRIDE; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 97 virtual void setDisplayMode(DisplayMode) OVERRIDE; | 105 virtual void setDisplayMode(DisplayMode) OVERRIDE; |
| 98 | 106 |
| 99 OwnPtrWillBeMember<HTMLImageLoader> m_imageLoader; | 107 OwnPtrWillBeMember<HTMLImageLoader> m_imageLoader; |
| 100 | 108 |
| 101 AtomicString m_defaultPosterURL; | 109 AtomicString m_defaultPosterURL; |
| 102 }; | 110 }; |
| 103 | 111 |
| 104 } //namespace | 112 } //namespace |
| 105 | 113 |
| 106 #endif | 114 #endif |
| OLD | NEW |