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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 497 // WebMemediaPlayer objects advertise they have audio and/or video, but don't | 497 // WebMemediaPlayer objects advertise they have audio and/or video, but don't |
| 498 // explicitly signal them via addAudioTrack() and addVideoTrack(). | 498 // explicitly signal them via addAudioTrack() and addVideoTrack(). |
| 499 // FIXME: Remove this once all WebMediaPlayer implementations properly report | 499 // FIXME: Remove this once all WebMediaPlayer implementations properly report |
| 500 // their track info. | 500 // their track info. |
| 501 void createPlaceholderTracksIfNecessary(); | 501 void createPlaceholderTracksIfNecessary(); |
| 502 | 502 |
| 503 // Sets the selected/enabled tracks if they aren't set before we initially | 503 // Sets the selected/enabled tracks if they aren't set before we initially |
| 504 // transition to kHaveMetadata. | 504 // transition to kHaveMetadata. |
| 505 void selectInitialTracksIfNecessary(); | 505 void selectInitialTracksIfNecessary(); |
| 506 | 506 |
| 507 // Return true if and only if |m_lockedPendingUserGesture| should be | |
| 508 // initialized as true. | |
|
mlamouri (slow - plz ping)
2016/11/18 14:33:10
The comment isn't entirely true because otherwise
Zhiqiang Zhang (Slow)
2016/11/21 18:06:23
Done.
| |
| 509 bool computeLockedPendingUserGesture(Document&) const; | |
| 510 | |
| 507 // Return true if and only if a user gesture is required to unlock this | 511 // Return true if and only if a user gesture is required to unlock this |
| 508 // media element for unrestricted autoplay / script control. Don't confuse | 512 // media element for unrestricted autoplay / script control. Don't confuse |
| 509 // this with isGestureNeededForPlayback(). The latter is usually what one | 513 // this with isGestureNeededForPlayback(). The latter is usually what one |
| 510 // should use, if checking to see if an action is allowed. | 514 // should use, if checking to see if an action is allowed. |
| 511 bool isLockedPendingUserGesture() const; | 515 bool isLockedPendingUserGesture() const; |
| 512 | 516 |
| 513 // If the user gesture is required, then this will remove it. Note that | 517 // If the user gesture is required, then this will remove it. Note that |
| 514 // one should not generally call this method directly; use the one on | 518 // one should not generally call this method directly; use the one on |
| 515 // m_helper and give it a reason. | 519 // m_helper and give it a reason. |
| 516 void unlockUserGesture(); | 520 void unlockUserGesture(); |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 736 | 740 |
| 737 inline bool isHTMLMediaElement(const HTMLElement& element) { | 741 inline bool isHTMLMediaElement(const HTMLElement& element) { |
| 738 return isHTMLAudioElement(element) || isHTMLVideoElement(element); | 742 return isHTMLAudioElement(element) || isHTMLVideoElement(element); |
| 739 } | 743 } |
| 740 | 744 |
| 741 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 745 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
| 742 | 746 |
| 743 } // namespace blink | 747 } // namespace blink |
| 744 | 748 |
| 745 #endif // HTMLMediaElement_h | 749 #endif // HTMLMediaElement_h |
| OLD | NEW |