| OLD | NEW |
| 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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 void scheduleEvent(PassRefPtrWillBeRawPtr<Event>); | 250 void scheduleEvent(PassRefPtrWillBeRawPtr<Event>); |
| 251 void scheduleTimeupdateEvent(bool periodicEvent); | 251 void scheduleTimeupdateEvent(bool periodicEvent); |
| 252 | 252 |
| 253 // Returns the "effective media volume" value as specified in the HTML5 spec
. | 253 // Returns the "effective media volume" value as specified in the HTML5 spec
. |
| 254 double effectiveMediaVolume() const; | 254 double effectiveMediaVolume() const; |
| 255 | 255 |
| 256 // Predicates also used when dispatching wrapper creation (cf. [SpecialWrapF
or] IDL attribute usage.) | 256 // Predicates also used when dispatching wrapper creation (cf. [SpecialWrapF
or] IDL attribute usage.) |
| 257 virtual bool isHTMLAudioElement() const { return false; } | 257 virtual bool isHTMLAudioElement() const { return false; } |
| 258 virtual bool isHTMLVideoElement() const { return false; } | 258 virtual bool isHTMLVideoElement() const { return false; } |
| 259 | 259 |
| 260 // Temporary callback for crbug.com/487345,402044 |
| 261 void notifyPositionMayHaveChanged(const IntRect&); |
| 262 void updatePositionNotificationRegistration(); |
| 263 |
| 260 protected: | 264 protected: |
| 261 HTMLMediaElement(const QualifiedName&, Document&); | 265 HTMLMediaElement(const QualifiedName&, Document&); |
| 262 ~HTMLMediaElement() override; | 266 ~HTMLMediaElement() override; |
| 263 #if ENABLE(OILPAN) | 267 #if ENABLE(OILPAN) |
| 264 void dispose(); | 268 void dispose(); |
| 265 #endif | 269 #endif |
| 266 | 270 |
| 267 void parseAttribute(const QualifiedName&, const AtomicString&) override; | 271 void parseAttribute(const QualifiedName&, const AtomicString&) override; |
| 268 void finishParsingChildren() final; | 272 void finishParsingChildren() final; |
| 269 bool isURLAttribute(const Attribute&) const override; | 273 bool isURLAttribute(const Attribute&) const override; |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 // Return true if and only if we require a user gesture before letting | 443 // Return true if and only if we require a user gesture before letting |
| 440 // the media play. | 444 // the media play. |
| 441 bool isUserGestureRequiredForPlay() const; | 445 bool isUserGestureRequiredForPlay() const; |
| 442 void removeUserGestureRequirement(); | 446 void removeUserGestureRequirement(); |
| 443 void setInitialPlayWithoutUserGestures(bool); | 447 void setInitialPlayWithoutUserGestures(bool); |
| 444 | 448 |
| 445 void setNetworkState(NetworkState); | 449 void setNetworkState(NetworkState); |
| 446 | 450 |
| 447 void audioTracksTimerFired(Timer<HTMLMediaElement>*); | 451 void audioTracksTimerFired(Timer<HTMLMediaElement>*); |
| 448 | 452 |
| 453 // TODO(liberato): remove once autoplay gesture override experiment conclude
s. |
| 454 void triggerAutoplayViewportCheckForTesting(); |
| 455 |
| 449 Timer<HTMLMediaElement> m_loadTimer; | 456 Timer<HTMLMediaElement> m_loadTimer; |
| 450 Timer<HTMLMediaElement> m_progressEventTimer; | 457 Timer<HTMLMediaElement> m_progressEventTimer; |
| 451 Timer<HTMLMediaElement> m_playbackProgressTimer; | 458 Timer<HTMLMediaElement> m_playbackProgressTimer; |
| 452 Timer<HTMLMediaElement> m_audioTracksTimer; | 459 Timer<HTMLMediaElement> m_audioTracksTimer; |
| 453 PersistentWillBeMember<TimeRanges> m_playedTimeRanges; | 460 PersistentWillBeMember<TimeRanges> m_playedTimeRanges; |
| 454 OwnPtrWillBeMember<GenericEventQueue> m_asyncEventQueue; | 461 OwnPtrWillBeMember<GenericEventQueue> m_asyncEventQueue; |
| 455 | 462 |
| 456 double m_playbackRate; | 463 double m_playbackRate; |
| 457 double m_defaultPlaybackRate; | 464 double m_defaultPlaybackRate; |
| 458 NetworkState m_networkState; | 465 NetworkState m_networkState; |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 inline bool isHTMLMediaElement(const HTMLElement& element) | 632 inline bool isHTMLMediaElement(const HTMLElement& element) |
| 626 { | 633 { |
| 627 return isHTMLAudioElement(element) || isHTMLVideoElement(element); | 634 return isHTMLAudioElement(element) || isHTMLVideoElement(element); |
| 628 } | 635 } |
| 629 | 636 |
| 630 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 637 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
| 631 | 638 |
| 632 } // namespace blink | 639 } // namespace blink |
| 633 | 640 |
| 634 #endif // HTMLMediaElement_h | 641 #endif // HTMLMediaElement_h |
| OLD | NEW |