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 3085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3096 stopPeriodicTimers(); | 3096 stopPeriodicTimers(); |
3097 m_loadTimer.stop(); | 3097 m_loadTimer.stop(); |
3098 | 3098 |
3099 m_pendingActionFlags &= ~flags; | 3099 m_pendingActionFlags &= ~flags; |
3100 m_loadState = WaitingForSource; | 3100 m_loadState = WaitingForSource; |
3101 | 3101 |
3102 // We can't cast if we don't have a media player. | 3102 // We can't cast if we don't have a media player. |
3103 m_remoteRoutesAvailable = false; | 3103 m_remoteRoutesAvailable = false; |
3104 m_playingRemotely = false; | 3104 m_playingRemotely = false; |
3105 if (mediaControls()) | 3105 if (mediaControls()) |
3106 mediaControls()->refreshCastButtonVisibility(); | 3106 mediaControls()->refreshCastButtonVisibilityWithoutUpdate(); |
3107 | 3107 |
3108 if (layoutObject()) | 3108 if (layoutObject()) |
3109 layoutObject()->setShouldDoFullPaintInvalidation(); | 3109 layoutObject()->setShouldDoFullPaintInvalidation(); |
3110 } | 3110 } |
3111 | 3111 |
3112 void HTMLMediaElement::stop() | 3112 void HTMLMediaElement::stop() |
3113 { | 3113 { |
3114 WTF_LOG(Media, "HTMLMediaElement::stop(%p)", this); | 3114 WTF_LOG(Media, "HTMLMediaElement::stop(%p)", this); |
3115 | 3115 |
3116 if (m_playing && m_initialPlayWithoutUserGestures) | 3116 if (m_playing && m_initialPlayWithoutUserGestures) |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3614 // or if its media controller position is either before the media resource's
earliest possible | 3614 // or if its media controller position is either before the media resource's
earliest possible |
3615 // position relative to the MediaController's timeline or after the end of t
he media resource | 3615 // position relative to the MediaController's timeline or after the end of t
he media resource |
3616 // relative to the MediaController's timeline. | 3616 // relative to the MediaController's timeline. |
3617 double mediaControllerPosition = m_mediaController->currentTime(); | 3617 double mediaControllerPosition = m_mediaController->currentTime(); |
3618 if (mediaControllerPosition < 0 || mediaControllerPosition > duration()) | 3618 if (mediaControllerPosition < 0 || mediaControllerPosition > duration()) |
3619 return true; | 3619 return true; |
3620 | 3620 |
3621 return false; | 3621 return false; |
3622 } | 3622 } |
3623 | 3623 |
| 3624 void HTMLMediaElement::setAllowHiddenVolumeControls(bool allow) |
| 3625 { |
| 3626 ensureMediaControls(); |
| 3627 mediaControls()->setAllowHiddenVolumeControls(allow); |
| 3628 } |
| 3629 |
3624 WebMediaPlayer::CORSMode HTMLMediaElement::corsMode() const | 3630 WebMediaPlayer::CORSMode HTMLMediaElement::corsMode() const |
3625 { | 3631 { |
3626 const AtomicString& crossOriginMode = fastGetAttribute(crossoriginAttr); | 3632 const AtomicString& crossOriginMode = fastGetAttribute(crossoriginAttr); |
3627 if (crossOriginMode.isNull()) | 3633 if (crossOriginMode.isNull()) |
3628 return WebMediaPlayer::CORSModeUnspecified; | 3634 return WebMediaPlayer::CORSModeUnspecified; |
3629 if (equalIgnoringCase(crossOriginMode, "use-credentials")) | 3635 if (equalIgnoringCase(crossOriginMode, "use-credentials")) |
3630 return WebMediaPlayer::CORSModeUseCredentials; | 3636 return WebMediaPlayer::CORSModeUseCredentials; |
3631 return WebMediaPlayer::CORSModeAnonymous; | 3637 return WebMediaPlayer::CORSModeAnonymous; |
3632 } | 3638 } |
3633 | 3639 |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3789 visitor->trace(m_client); | 3795 visitor->trace(m_client); |
3790 } | 3796 } |
3791 | 3797 |
3792 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl) | 3798 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl) |
3793 { | 3799 { |
3794 visitor->trace(m_client); | 3800 visitor->trace(m_client); |
3795 } | 3801 } |
3796 #endif | 3802 #endif |
3797 | 3803 |
3798 } | 3804 } |
OLD | NEW |