Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 458 bool couldPlayIfEnoughData() const; | 458 bool couldPlayIfEnoughData() const; |
| 459 | 459 |
| 460 // Generally the presence of the loop attribute should be considered to mean | 460 // Generally the presence of the loop attribute should be considered to mean |
| 461 // playback has not "ended", as "ended" and "looping" are mutually exclusive. | 461 // playback has not "ended", as "ended" and "looping" are mutually exclusive. |
| 462 // See | 462 // See |
| 463 // https://html.spec.whatwg.org/multipage/embedded-content.html#ended-playback | 463 // https://html.spec.whatwg.org/multipage/embedded-content.html#ended-playback |
| 464 enum class LoopCondition { Included, Ignored }; | 464 enum class LoopCondition { Included, Ignored }; |
| 465 bool endedPlayback(LoopCondition = LoopCondition::Included) const; | 465 bool endedPlayback(LoopCondition = LoopCondition::Included) const; |
| 466 | 466 |
| 467 void setShouldDelayLoadEvent(bool); | 467 void setShouldDelayLoadEvent(bool); |
| 468 void invalidateCachedTime(); | 468 |
| 469 void refreshCachedTime() const; | 469 double earliestPossiblePosition() const; |
| 470 double currentPlaybackPosition() const; | |
| 471 double officialPlaybackPosition() const; | |
| 472 void setOfficialPlaybackPosition(double) const; | |
|
chcunningham
2016/10/25 22:46:18
The const-ness of currentTime spreads to these met
| |
| 473 void requireOfficialPlaybackPositionUpdate() const; | |
| 470 | 474 |
| 471 void ensureMediaControls(); | 475 void ensureMediaControls(); |
| 472 void configureMediaControls(); | 476 void configureMediaControls(); |
| 473 | 477 |
| 474 TextTrackContainer& ensureTextTrackContainer(); | 478 TextTrackContainer& ensureTextTrackContainer(); |
| 475 | 479 |
| 476 EventDispatchHandlingState* preDispatchEventHandler(Event*) final; | 480 EventDispatchHandlingState* preDispatchEventHandler(Event*) final; |
| 477 | 481 |
| 478 void changeNetworkStateFromLoadingToIdle(); | 482 void changeNetworkStateFromLoadingToIdle(); |
| 479 | 483 |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 601 | 605 |
| 602 std::unique_ptr<WebMediaPlayer> m_webMediaPlayer; | 606 std::unique_ptr<WebMediaPlayer> m_webMediaPlayer; |
| 603 WebLayer* m_webLayer; | 607 WebLayer* m_webLayer; |
| 604 | 608 |
| 605 DisplayMode m_displayMode; | 609 DisplayMode m_displayMode; |
| 606 | 610 |
| 607 Member<HTMLMediaSource> m_mediaSource; | 611 Member<HTMLMediaSource> m_mediaSource; |
| 608 | 612 |
| 609 // Cached time value. Only valid when ready state is kHaveMetadata or | 613 // Cached time value. Only valid when ready state is kHaveMetadata or |
| 610 // higher, otherwise the current time is assumed to be zero. | 614 // higher, otherwise the current time is assumed to be zero. |
| 611 mutable double m_cachedTime; | 615 mutable double m_officialPlaybackPosition; |
| 616 mutable bool m_officialPlaybackPositionNeedsUpdate; | |
| 612 | 617 |
| 613 double m_fragmentEndTime; | 618 double m_fragmentEndTime; |
| 614 | 619 |
| 615 typedef unsigned PendingActionFlags; | 620 typedef unsigned PendingActionFlags; |
| 616 PendingActionFlags m_pendingActionFlags; | 621 PendingActionFlags m_pendingActionFlags; |
| 617 | 622 |
| 618 // FIXME: HTMLMediaElement has way too many state bits. | 623 // FIXME: HTMLMediaElement has way too many state bits. |
| 619 bool m_lockedPendingUserGesture : 1; | 624 bool m_lockedPendingUserGesture : 1; |
| 620 bool m_playing : 1; | 625 bool m_playing : 1; |
| 621 bool m_shouldDelayLoadEvent : 1; | 626 bool m_shouldDelayLoadEvent : 1; |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 729 | 734 |
| 730 inline bool isHTMLMediaElement(const HTMLElement& element) { | 735 inline bool isHTMLMediaElement(const HTMLElement& element) { |
| 731 return isHTMLAudioElement(element) || isHTMLVideoElement(element); | 736 return isHTMLAudioElement(element) || isHTMLVideoElement(element); |
| 732 } | 737 } |
| 733 | 738 |
| 734 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 739 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
| 735 | 740 |
| 736 } // namespace blink | 741 } // namespace blink |
| 737 | 742 |
| 738 #endif // HTMLMediaElement_h | 743 #endif // HTMLMediaElement_h |
| OLD | NEW |