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

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

Issue 483863003: Use SpecialWrapFor over HTMLMediaElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use [SpecialWrapFor] instead Created 6 years, 4 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/HTMLAudioElement.h ('k') | Source/core/html/HTMLMediaElement.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, 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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 // Oilpan: finalization of the media element is observable from its 296 // Oilpan: finalization of the media element is observable from its
297 // attached MediaSource; it entering a closed state. 297 // attached MediaSource; it entering a closed state.
298 // 298 //
299 // Express that by having the MediaSource keep a weak reference 299 // Express that by having the MediaSource keep a weak reference
300 // to the media element and signal that it wants to be notified 300 // to the media element and signal that it wants to be notified
301 // of destruction if it survives a GC, but the media element 301 // of destruction if it survives a GC, but the media element
302 // doesn't. 302 // doesn't.
303 void setCloseMediaSourceWhenFinalizing(); 303 void setCloseMediaSourceWhenFinalizing();
304 #endif 304 #endif
305 305
306 // Predicates also used when dispatching wrapper creation (cf. [SpecialWrapF or] IDL attribute usage.)
307 virtual bool isHTMLAudioElement() const { return false; }
308 virtual bool isHTMLVideoElement() const { return false; }
309
306 protected: 310 protected:
307 HTMLMediaElement(const QualifiedName&, Document&); 311 HTMLMediaElement(const QualifiedName&, Document&);
308 virtual ~HTMLMediaElement(); 312 virtual ~HTMLMediaElement();
309 313
310 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE; 314 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE;
311 virtual void finishParsingChildren() OVERRIDE FINAL; 315 virtual void finishParsingChildren() OVERRIDE FINAL;
312 virtual bool isURLAttribute(const Attribute&) const OVERRIDE; 316 virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
313 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; 317 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE;
314 318
315 virtual void didMoveToNewDocument(Document& oldDocument) OVERRIDE; 319 virtual void didMoveToNewDocument(Document& oldDocument) OVERRIDE;
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 inline bool isHTMLMediaElement(const HTMLElement& element) 631 inline bool isHTMLMediaElement(const HTMLElement& element)
628 { 632 {
629 return isHTMLAudioElement(element) || isHTMLVideoElement(element); 633 return isHTMLAudioElement(element) || isHTMLVideoElement(element);
630 } 634 }
631 635
632 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); 636 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement);
633 637
634 } //namespace 638 } //namespace
635 639
636 #endif 640 #endif
OLDNEW
« no previous file with comments | « Source/core/html/HTMLAudioElement.h ('k') | Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698