diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/html/MediaDocument.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/html/MediaDocument.h')
-rw-r--r-- | Source/WebCore/html/MediaDocument.h | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/Source/WebCore/html/MediaDocument.h b/Source/WebCore/html/MediaDocument.h index 3e3474719..5a863aed8 100644 --- a/Source/WebCore/html/MediaDocument.h +++ b/Source/WebCore/html/MediaDocument.h @@ -23,8 +23,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef MediaDocument_h -#define MediaDocument_h +#pragma once #if ENABLE(VIDEO) @@ -34,32 +33,34 @@ namespace WebCore { class MediaDocument final : public HTMLDocument { public: - static PassRefPtr<MediaDocument> create(Frame* frame, const URL& url) + static Ref<MediaDocument> create(Frame* frame, const URL& url) { - return adoptRef(new MediaDocument(frame, url)); + return adoptRef(*new MediaDocument(frame, url)); } virtual ~MediaDocument(); void mediaElementSawUnsupportedTracks(); + void mediaElementNaturalSizeChanged(const IntSize&); + String outgoingReferrer() const { return m_outgoingReferrer; } private: MediaDocument(Frame*, const URL&); - virtual PassRefPtr<DocumentParser> createParser() override; + Ref<DocumentParser> createParser() override; - virtual void defaultEventHandler(Event*) override; + void defaultEventHandler(Event&) override; - void replaceMediaElementTimerFired(Timer<MediaDocument>&); + void replaceMediaElementTimerFired(); - Timer<MediaDocument> m_replaceMediaElementTimer; + Timer m_replaceMediaElementTimer; + String m_outgoingReferrer; }; -inline bool isMediaDocument(const Document& document) { return document.isMediaDocument(); } -void isMediaDocument(const MediaDocument&); // Catch unnecessary runtime check of type known at compile time. +} // namespace WebCore -DOCUMENT_TYPE_CASTS(MediaDocument) +SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::MediaDocument) + static bool isType(const WebCore::Document& document) { return document.isMediaDocument(); } + static bool isType(const WebCore::Node& node) { return is<WebCore::Document>(node) && isType(downcast<WebCore::Document>(node)); } +SPECIALIZE_TYPE_TRAITS_END() -} - -#endif -#endif +#endif // ENABLE(VIDEO) |