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

Side by Side Diff: Source/core/html/HTMLVideoElement.h

Issue 32103002: Use MeasureAs and ImplementedAs in media IDL (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: accidentally dropped two UseCounters Created 7 years, 2 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 unified diff | Download patch
« no previous file with comments | « Source/core/html/HTMLMediaElement.idl ('k') | Source/core/html/HTMLVideoElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * 12 *
13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
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/page/UseCounter.h"
31 30
32 namespace WebCore { 31 namespace WebCore {
33 32
34 class ExceptionState; 33 class ExceptionState;
35 class HTMLImageLoader; 34 class HTMLImageLoader;
36 35
37 class HTMLVideoElement FINAL : public HTMLMediaElement { 36 class HTMLVideoElement FINAL : public HTMLMediaElement {
38 public: 37 public:
39 static PassRefPtr<HTMLVideoElement> create(Document& document) { return crea te(HTMLNames::videoTag, document, false); } 38 static PassRefPtr<HTMLVideoElement> create(Document& document) { return crea te(HTMLNames::videoTag, document, false); }
40 static PassRefPtr<HTMLVideoElement> create(const QualifiedName&, Document&, bool); 39 static PassRefPtr<HTMLVideoElement> create(const QualifiedName&, Document&, bool);
41 40
42 unsigned width() const; 41 unsigned width() const;
43 unsigned height() const; 42 unsigned height() const;
44 43
45 unsigned videoWidth() const; 44 unsigned videoWidth() const;
46 unsigned videoHeight() const; 45 unsigned videoHeight() const;
47 46
48 // Fullscreen 47 // Fullscreen
49 void webkitEnterFullscreen(ExceptionState&, UseCounter::Feature); 48 void webkitEnterFullscreen(ExceptionState&);
50 void webkitExitFullscreen(UseCounter::Feature); 49 void webkitExitFullscreen();
51 void webkitEnterFullscreen(ExceptionState& es) { webkitEnterFullscreen(es, U seCounter::PrefixedVideoEnterFullscreen); }
52 void webkitExitFullscreen() { webkitExitFullscreen(UseCounter::PrefixedVideo ExitFullscreen); }
53 bool webkitSupportsFullscreen(); 50 bool webkitSupportsFullscreen();
54 bool webkitDisplayingFullscreen(); 51 bool webkitDisplayingFullscreen();
55 52
56 // FIXME: Maintain "FullScreen" capitalization scheme for backwards compatib ility.
57 // https://bugs.webkit.org/show_bug.cgi?id=36081
58 void webkitEnterFullScreen(ExceptionState& es) { webkitEnterFullscreen(es, U seCounter::PrefixedVideoEnterFullScreen); }
59 void webkitExitFullScreen() { webkitExitFullscreen(UseCounter::PrefixedVideo ExitFullScreen); }
60
61 // Statistics 53 // Statistics
62 unsigned webkitDecodedFrameCount() const; 54 unsigned webkitDecodedFrameCount() const;
63 unsigned webkitDroppedFrameCount() const; 55 unsigned webkitDroppedFrameCount() const;
64 56
65 // Used by canvas to gain raw pixel access 57 // Used by canvas to gain raw pixel access
66 void paintCurrentFrameInContext(GraphicsContext*, const IntRect&); 58 void paintCurrentFrameInContext(GraphicsContext*, const IntRect&);
67 59
68 // Used by WebGL to do GPU-GPU textures copy if possible. 60 // Used by WebGL to do GPU-GPU textures copy if possible.
69 // See more details at MediaPlayer::copyVideoTextureToPlatformTexture() defi ned in Source/WebCore/platform/graphics/MediaPlayer.h. 61 // See more details at MediaPlayer::copyVideoTextureToPlatformTexture() defi ned in Source/WebCore/platform/graphics/MediaPlayer.h.
70 bool copyVideoTextureToPlatformTexture(GraphicsContext3D*, Platform3DObject texture, GC3Dint level, GC3Denum type, GC3Denum internalFormat, bool premultiply Alpha, bool flipY); 62 bool copyVideoTextureToPlatformTexture(GraphicsContext3D*, Platform3DObject texture, GC3Dint level, GC3Denum type, GC3Denum internalFormat, bool premultiply Alpha, bool flipY);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 102
111 inline HTMLVideoElement* toHTMLVideoElement(Node* node) 103 inline HTMLVideoElement* toHTMLVideoElement(Node* node)
112 { 104 {
113 ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLVideoElement(node)); 105 ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLVideoElement(node));
114 return static_cast<HTMLVideoElement*>(node); 106 return static_cast<HTMLVideoElement*>(node);
115 } 107 }
116 108
117 } //namespace 109 } //namespace
118 110
119 #endif 111 #endif
OLDNEW
« no previous file with comments | « Source/core/html/HTMLMediaElement.idl ('k') | Source/core/html/HTMLVideoElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698