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

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

Issue 66643004: Remove QualifiedName argument from most HTMLElement::create functions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Hack for XML prefix Created 7 years, 1 month 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 | Annotate | Revision Log
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
(...skipping 17 matching lines...) Expand all
28 28
29 #include "core/html/HTMLMediaElement.h" 29 #include "core/html/HTMLMediaElement.h"
30 30
31 namespace WebCore { 31 namespace WebCore {
32 32
33 class ExceptionState; 33 class ExceptionState;
34 class HTMLImageLoader; 34 class HTMLImageLoader;
35 35
36 class HTMLVideoElement FINAL : public HTMLMediaElement { 36 class HTMLVideoElement FINAL : public HTMLMediaElement {
37 public: 37 public:
38 static PassRefPtr<HTMLVideoElement> create(Document& document) { return crea te(HTMLNames::videoTag, document, false); } 38 static PassRefPtr<HTMLVideoElement> create(Document&, bool createdByParser = false);
39 static PassRefPtr<HTMLVideoElement> create(const QualifiedName&, Document&, bool);
40 39
41 unsigned videoWidth() const; 40 unsigned videoWidth() const;
42 unsigned videoHeight() const; 41 unsigned videoHeight() const;
43 42
44 // Fullscreen 43 // Fullscreen
45 void webkitEnterFullscreen(ExceptionState&); 44 void webkitEnterFullscreen(ExceptionState&);
46 void webkitExitFullscreen(); 45 void webkitExitFullscreen();
47 bool webkitSupportsFullscreen(); 46 bool webkitSupportsFullscreen();
48 bool webkitDisplayingFullscreen(); 47 bool webkitDisplayingFullscreen();
49 48
50 // Statistics 49 // Statistics
51 unsigned webkitDecodedFrameCount() const; 50 unsigned webkitDecodedFrameCount() const;
52 unsigned webkitDroppedFrameCount() const; 51 unsigned webkitDroppedFrameCount() const;
53 52
54 // Used by canvas to gain raw pixel access 53 // Used by canvas to gain raw pixel access
55 void paintCurrentFrameInContext(GraphicsContext*, const IntRect&); 54 void paintCurrentFrameInContext(GraphicsContext*, const IntRect&);
56 55
57 // Used by WebGL to do GPU-GPU textures copy if possible. 56 // Used by WebGL to do GPU-GPU textures copy if possible.
58 // See more details at MediaPlayer::copyVideoTextureToPlatformTexture() defi ned in Source/WebCore/platform/graphics/MediaPlayer.h. 57 // See more details at MediaPlayer::copyVideoTextureToPlatformTexture() defi ned in Source/WebCore/platform/graphics/MediaPlayer.h.
59 bool copyVideoTextureToPlatformTexture(GraphicsContext3D*, Platform3DObject texture, GC3Dint level, GC3Denum type, GC3Denum internalFormat, bool premultiply Alpha, bool flipY); 58 bool copyVideoTextureToPlatformTexture(GraphicsContext3D*, Platform3DObject texture, GC3Dint level, GC3Denum type, GC3Denum internalFormat, bool premultiply Alpha, bool flipY);
60 59
61 bool shouldDisplayPosterImage() const { return displayMode() == Poster || di splayMode() == PosterWaitingForVideo; } 60 bool shouldDisplayPosterImage() const { return displayMode() == Poster || di splayMode() == PosterWaitingForVideo; }
62 61
63 KURL posterImageURL() const; 62 KURL posterImageURL() const;
64 63
65 private: 64 private:
66 HTMLVideoElement(const QualifiedName&, Document&, bool); 65 HTMLVideoElement(Document&, bool);
67 66
68 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE; 67 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE;
69 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; 68 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE;
70 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; 69 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE;
71 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE; 70 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE;
72 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 71 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
73 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons t AtomicString&, MutableStylePropertySet*) OVERRIDE; 72 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons t AtomicString&, MutableStylePropertySet*) OVERRIDE;
74 virtual bool isVideo() const OVERRIDE { return true; } 73 virtual bool isVideo() const OVERRIDE { return true; }
75 virtual bool hasVideo() const OVERRIDE { return player() && player()->hasVid eo(); } 74 virtual bool hasVideo() const OVERRIDE { return player() && player()->hasVid eo(); }
76 virtual bool supportsFullscreen() const OVERRIDE; 75 virtual bool supportsFullscreen() const OVERRIDE;
(...skipping 18 matching lines...) Expand all
95 inline bool isHTMLVideoElement(const Element* element) 94 inline bool isHTMLVideoElement(const Element* element)
96 { 95 {
97 return element->hasTagName(HTMLNames::videoTag); 96 return element->hasTagName(HTMLNames::videoTag);
98 } 97 }
99 98
100 DEFINE_NODE_TYPE_CASTS(HTMLVideoElement, hasTagName(HTMLNames::videoTag)); 99 DEFINE_NODE_TYPE_CASTS(HTMLVideoElement, hasTagName(HTMLNames::videoTag));
101 100
102 } //namespace 101 } //namespace
103 102
104 #endif 103 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698