| 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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 // one should not generally call this method directly; use the one on | 461 // one should not generally call this method directly; use the one on |
| 462 // m_helper and give it a reason. | 462 // m_helper and give it a reason. |
| 463 void unlockUserGesture(); | 463 void unlockUserGesture(); |
| 464 | 464 |
| 465 // Return true if and only if a user gesture is requried for playback. Even | 465 // Return true if and only if a user gesture is requried for playback. Even |
| 466 // if isLockedPendingUserGesture() return true, this might return false if | 466 // if isLockedPendingUserGesture() return true, this might return false if |
| 467 // the requirement is currently overridden. This does not check if a user | 467 // the requirement is currently overridden. This does not check if a user |
| 468 // gesture is currently being processed. | 468 // gesture is currently being processed. |
| 469 bool isGestureNeededForPlayback() const; | 469 bool isGestureNeededForPlayback() const; |
| 470 | 470 |
| 471 // Return true if and only if the settings allow autoplay of media on this |
| 472 // frame. |
| 473 bool isAutoplayAllowedPerSettings() const; |
| 474 |
| 471 void setNetworkState(NetworkState); | 475 void setNetworkState(NetworkState); |
| 472 | 476 |
| 473 void audioTracksTimerFired(Timer<HTMLMediaElement>*); | 477 void audioTracksTimerFired(Timer<HTMLMediaElement>*); |
| 474 | 478 |
| 475 // TODO(liberato): remove once autoplay gesture override experiment conclude
s. | 479 // TODO(liberato): remove once autoplay gesture override experiment conclude
s. |
| 476 void triggerAutoplayViewportCheckForTesting(); | 480 void triggerAutoplayViewportCheckForTesting(); |
| 477 | 481 |
| 478 void scheduleResolvePlayPromises(); | 482 void scheduleResolvePlayPromises(); |
| 479 void scheduleRejectPlayPromises(ExceptionCode); | 483 void scheduleRejectPlayPromises(ExceptionCode); |
| 480 void scheduleNotifyPlaying(); | 484 void scheduleNotifyPlaying(); |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 inline bool isHTMLMediaElement(const HTMLElement& element) | 674 inline bool isHTMLMediaElement(const HTMLElement& element) |
| 671 { | 675 { |
| 672 return isHTMLAudioElement(element) || isHTMLVideoElement(element); | 676 return isHTMLAudioElement(element) || isHTMLVideoElement(element); |
| 673 } | 677 } |
| 674 | 678 |
| 675 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 679 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
| 676 | 680 |
| 677 } // namespace blink | 681 } // namespace blink |
| 678 | 682 |
| 679 #endif // HTMLMediaElement_h | 683 #endif // HTMLMediaElement_h |
| OLD | NEW |