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

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

Issue 1184373006: Oilpan: add prefinalizer for HTMLMediaElement. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: move out a potentially-allocating action from prefinalizer Created 5 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 class URLRegistry; 65 class URLRegistry;
66 class VideoTrackList; 66 class VideoTrackList;
67 67
68 // FIXME: The inheritance from MediaPlayerClient here should be private inherita nce. 68 // FIXME: The inheritance from MediaPlayerClient here should be private inherita nce.
69 // But it can't be until the Chromium WebMediaPlayerClientImpl class is fixed so it 69 // But it can't be until the Chromium WebMediaPlayerClientImpl class is fixed so it
70 // no longer depends on typecasting a MediaPlayerClient to an HTMLMediaElement. 70 // no longer depends on typecasting a MediaPlayerClient to an HTMLMediaElement.
71 71
72 class CORE_EXPORT HTMLMediaElement : public HTMLElement, public WillBeHeapSupple mentable<HTMLMediaElement>, public MediaPlayerClient, public ActiveDOMObject { 72 class CORE_EXPORT HTMLMediaElement : public HTMLElement, public WillBeHeapSupple mentable<HTMLMediaElement>, public MediaPlayerClient, public ActiveDOMObject {
73 DEFINE_WRAPPERTYPEINFO(); 73 DEFINE_WRAPPERTYPEINFO();
74 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(HTMLMediaElement); 74 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(HTMLMediaElement);
75 WILL_BE_USING_PRE_FINALIZER(HTMLMediaElement, dispose);
75 public: 76 public:
76 static WebMimeRegistry::SupportsType supportsType(const ContentType&, const String& keySystem = String()); 77 static WebMimeRegistry::SupportsType supportsType(const ContentType&, const String& keySystem = String());
77 78
78 static void setMediaStreamRegistry(URLRegistry*); 79 static void setMediaStreamRegistry(URLRegistry*);
79 static bool isMediaStreamURL(const String& url); 80 static bool isMediaStreamURL(const String& url);
80 81
81 DECLARE_VIRTUAL_TRACE(); 82 DECLARE_VIRTUAL_TRACE();
82 #if ENABLE(WEB_AUDIO) 83 #if ENABLE(WEB_AUDIO)
83 void clearWeakMembers(Visitor*); 84 void clearWeakMembers(Visitor*);
84 #endif 85 #endif
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 void setCloseMediaSourceWhenFinalizing(); 282 void setCloseMediaSourceWhenFinalizing();
282 #endif 283 #endif
283 284
284 // Predicates also used when dispatching wrapper creation (cf. [SpecialWrapF or] IDL attribute usage.) 285 // Predicates also used when dispatching wrapper creation (cf. [SpecialWrapF or] IDL attribute usage.)
285 virtual bool isHTMLAudioElement() const { return false; } 286 virtual bool isHTMLAudioElement() const { return false; }
286 virtual bool isHTMLVideoElement() const { return false; } 287 virtual bool isHTMLVideoElement() const { return false; }
287 288
288 protected: 289 protected:
289 HTMLMediaElement(const QualifiedName&, Document&); 290 HTMLMediaElement(const QualifiedName&, Document&);
290 virtual ~HTMLMediaElement(); 291 virtual ~HTMLMediaElement();
292 #if ENABLE(OILPAN)
293 void dispose();
294 #endif
291 295
292 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr ide; 296 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr ide;
293 virtual void finishParsingChildren() override final; 297 virtual void finishParsingChildren() override final;
294 virtual bool isURLAttribute(const Attribute&) const override; 298 virtual bool isURLAttribute(const Attribute&) const override;
295 virtual void attach(const AttachContext& = AttachContext()) override; 299 virtual void attach(const AttachContext& = AttachContext()) override;
296 300
297 virtual void didMoveToNewDocument(Document& oldDocument) override; 301 virtual void didMoveToNewDocument(Document& oldDocument) override;
298 302
299 enum DisplayMode { Unknown, Poster, Video }; 303 enum DisplayMode { Unknown, Poster, Video };
300 DisplayMode displayMode() const { return m_displayMode; } 304 DisplayMode displayMode() const { return m_displayMode; }
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 inline bool isHTMLMediaElement(const HTMLElement& element) 590 inline bool isHTMLMediaElement(const HTMLElement& element)
587 { 591 {
588 return isHTMLAudioElement(element) || isHTMLVideoElement(element); 592 return isHTMLAudioElement(element) || isHTMLVideoElement(element);
589 } 593 }
590 594
591 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); 595 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement);
592 596
593 } // namespace blink 597 } // namespace blink
594 598
595 #endif // HTMLMediaElement_h 599 #endif // HTMLMediaElement_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/HTMLMediaElement.cpp » ('j') | Source/core/html/HTMLMediaElement.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698