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

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

Issue 23886003: Have HTMLElements / SVGElements constructors take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Another Android build fix Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLUnknownElement.h ('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
(...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& document) { return crea te(HTMLNames::videoTag, document, false); }
39 static PassRefPtr<HTMLVideoElement> create(const QualifiedName&, Document*, bool); 39 static PassRefPtr<HTMLVideoElement> create(const QualifiedName&, Document&, bool);
40 40
41 unsigned width() const; 41 unsigned width() const;
42 unsigned height() const; 42 unsigned height() const;
43 43
44 unsigned videoWidth() const; 44 unsigned videoWidth() const;
45 unsigned videoHeight() const; 45 unsigned videoHeight() const;
46 46
47 // Fullscreen 47 // Fullscreen
48 void webkitEnterFullscreen(ExceptionState&); 48 void webkitEnterFullscreen(ExceptionState&);
49 void webkitExitFullscreen(); 49 void webkitExitFullscreen();
(...skipping 14 matching lines...) Expand all
64 64
65 // Used by WebGL to do GPU-GPU textures copy if possible. 65 // Used by WebGL to do GPU-GPU textures copy if possible.
66 // See more details at MediaPlayer::copyVideoTextureToPlatformTexture() defi ned in Source/WebCore/platform/graphics/MediaPlayer.h. 66 // See more details at MediaPlayer::copyVideoTextureToPlatformTexture() defi ned in Source/WebCore/platform/graphics/MediaPlayer.h.
67 bool copyVideoTextureToPlatformTexture(GraphicsContext3D*, Platform3DObject texture, GC3Dint level, GC3Denum type, GC3Denum internalFormat, bool premultiply Alpha, bool flipY); 67 bool copyVideoTextureToPlatformTexture(GraphicsContext3D*, Platform3DObject texture, GC3Dint level, GC3Denum type, GC3Denum internalFormat, bool premultiply Alpha, bool flipY);
68 68
69 bool shouldDisplayPosterImage() const { return displayMode() == Poster || di splayMode() == PosterWaitingForVideo; } 69 bool shouldDisplayPosterImage() const { return displayMode() == Poster || di splayMode() == PosterWaitingForVideo; }
70 70
71 KURL posterImageURL() const; 71 KURL posterImageURL() const;
72 72
73 private: 73 private:
74 HTMLVideoElement(const QualifiedName&, Document*, bool); 74 HTMLVideoElement(const QualifiedName&, Document&, bool);
75 75
76 virtual bool rendererIsNeeded(const NodeRenderingContext&); 76 virtual bool rendererIsNeeded(const NodeRenderingContext&);
77 virtual RenderObject* createRenderer(RenderStyle*); 77 virtual RenderObject* createRenderer(RenderStyle*);
78 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; 78 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE;
79 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE; 79 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE;
80 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 80 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
81 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons t AtomicString&, MutableStylePropertySet*) OVERRIDE; 81 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons t AtomicString&, MutableStylePropertySet*) OVERRIDE;
82 virtual bool isVideo() const { return true; } 82 virtual bool isVideo() const { return true; }
83 virtual bool hasVideo() const { return player() && player()->hasVideo(); } 83 virtual bool hasVideo() const { return player() && player()->hasVideo(); }
84 virtual bool supportsFullscreen() const; 84 virtual bool supportsFullscreen() const;
(...skipping 22 matching lines...) Expand all
107 107
108 inline HTMLVideoElement* toHTMLVideoElement(Node* node) 108 inline HTMLVideoElement* toHTMLVideoElement(Node* node)
109 { 109 {
110 ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLVideoElement(node)); 110 ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLVideoElement(node));
111 return static_cast<HTMLVideoElement*>(node); 111 return static_cast<HTMLVideoElement*>(node);
112 } 112 }
113 113
114 } //namespace 114 } //namespace
115 115
116 #endif 116 #endif
OLDNEW
« no previous file with comments | « Source/core/html/HTMLUnknownElement.h ('k') | Source/core/html/HTMLVideoElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698