| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 64 #include "core/loader/FrameLoader.h" | 64 #include "core/loader/FrameLoader.h" | 
| 65 #include "core/loader/FrameLoaderClient.h" | 65 #include "core/loader/FrameLoaderClient.h" | 
| 66 #include "core/page/ChromeClient.h" | 66 #include "core/page/ChromeClient.h" | 
| 67 #include "core/page/NetworkStateNotifier.h" | 67 #include "core/page/NetworkStateNotifier.h" | 
| 68 #include "platform/ContentType.h" | 68 #include "platform/ContentType.h" | 
| 69 #include "platform/Logging.h" | 69 #include "platform/Logging.h" | 
| 70 #include "platform/MIMETypeFromURL.h" | 70 #include "platform/MIMETypeFromURL.h" | 
| 71 #include "platform/MIMETypeRegistry.h" | 71 #include "platform/MIMETypeRegistry.h" | 
| 72 #include "platform/RuntimeEnabledFeatures.h" | 72 #include "platform/RuntimeEnabledFeatures.h" | 
| 73 #include "platform/UserGestureIndicator.h" | 73 #include "platform/UserGestureIndicator.h" | 
|  | 74 #include "platform/audio/AudioBus.h" | 
|  | 75 #include "platform/audio/AudioSourceProviderClient.h" | 
| 74 #include "platform/graphics/GraphicsLayer.h" | 76 #include "platform/graphics/GraphicsLayer.h" | 
| 75 #include "platform/weborigin/SecurityOrigin.h" | 77 #include "platform/weborigin/SecurityOrigin.h" | 
| 76 #include "public/platform/Platform.h" | 78 #include "public/platform/Platform.h" | 
|  | 79 #include "public/platform/WebAudioSourceProvider.h" | 
| 77 #include "public/platform/WebContentDecryptionModule.h" | 80 #include "public/platform/WebContentDecryptionModule.h" | 
| 78 #include "public/platform/WebInbandTextTrack.h" | 81 #include "public/platform/WebInbandTextTrack.h" | 
| 79 #include "wtf/CurrentTime.h" | 82 #include "wtf/CurrentTime.h" | 
| 80 #include "wtf/MainThread.h" | 83 #include "wtf/MainThread.h" | 
| 81 #include "wtf/MathExtras.h" | 84 #include "wtf/MathExtras.h" | 
| 82 #include "wtf/text/CString.h" | 85 #include "wtf/text/CString.h" | 
| 83 #include <limits> | 86 #include <limits> | 
| 84 | 87 | 
| 85 #if ENABLE(WEB_AUDIO) |  | 
| 86 #include "platform/audio/AudioBus.h" |  | 
| 87 #include "platform/audio/AudioSourceProviderClient.h" |  | 
| 88 #include "public/platform/WebAudioSourceProvider.h" |  | 
| 89 #endif |  | 
| 90 | 88 | 
| 91 namespace blink { | 89 namespace blink { | 
| 92 | 90 | 
| 93 #if !LOG_DISABLED | 91 #if !LOG_DISABLED | 
| 94 static String urlForLoggingMedia(const KURL& url) | 92 static String urlForLoggingMedia(const KURL& url) | 
| 95 { | 93 { | 
| 96     static const unsigned maximumURLLengthForLogging = 128; | 94     static const unsigned maximumURLLengthForLogging = 128; | 
| 97 | 95 | 
| 98     if (url.string().length() < maximumURLLengthForLogging) | 96     if (url.string().length() < maximumURLLengthForLogging) | 
| 99         return url.string(); | 97         return url.string(); | 
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 144     DocumentElementSetMap& map = documentToElementSetMap(); | 142     DocumentElementSetMap& map = documentToElementSetMap(); | 
| 145     WeakMediaElementSet set = map.take(document); | 143     WeakMediaElementSet set = map.take(document); | 
| 146     set.remove(element); | 144     set.remove(element); | 
| 147     if (!set.isEmpty()) | 145     if (!set.isEmpty()) | 
| 148         map.add(document, set); | 146         map.add(document, set); | 
| 149 } | 147 } | 
| 150 | 148 | 
| 151 class AudioSourceProviderClientLockScope { | 149 class AudioSourceProviderClientLockScope { | 
| 152     STACK_ALLOCATED(); | 150     STACK_ALLOCATED(); | 
| 153 public: | 151 public: | 
| 154 #if ENABLE(WEB_AUDIO) |  | 
| 155     AudioSourceProviderClientLockScope(HTMLMediaElement& element) | 152     AudioSourceProviderClientLockScope(HTMLMediaElement& element) | 
| 156         : m_client(element.audioSourceNode()) | 153         : m_client(element.audioSourceNode()) | 
| 157     { | 154     { | 
| 158         if (m_client) | 155         if (m_client) | 
| 159             m_client->lock(); | 156             m_client->lock(); | 
| 160     } | 157     } | 
| 161     ~AudioSourceProviderClientLockScope() | 158     ~AudioSourceProviderClientLockScope() | 
| 162     { | 159     { | 
| 163         if (m_client) | 160         if (m_client) | 
| 164             m_client->unlock(); | 161             m_client->unlock(); | 
| 165     } | 162     } | 
| 166 | 163 | 
| 167 private: | 164 private: | 
| 168     Member<AudioSourceProviderClient> m_client; | 165     Member<AudioSourceProviderClient> m_client; | 
| 169 #else |  | 
| 170     explicit AudioSourceProviderClientLockScope(HTMLMediaElement&) { } |  | 
| 171     ~AudioSourceProviderClientLockScope() { } |  | 
| 172 #endif |  | 
| 173 }; | 166 }; | 
| 174 | 167 | 
| 175 static const AtomicString& AudioKindToString(WebMediaPlayerClient::AudioTrackKin
      d kind) | 168 static const AtomicString& AudioKindToString(WebMediaPlayerClient::AudioTrackKin
      d kind) | 
| 176 { | 169 { | 
| 177     switch (kind) { | 170     switch (kind) { | 
| 178     case WebMediaPlayerClient::AudioTrackKindNone: | 171     case WebMediaPlayerClient::AudioTrackKindNone: | 
| 179         return emptyAtom; | 172         return emptyAtom; | 
| 180     case WebMediaPlayerClient::AudioTrackKindAlternative: | 173     case WebMediaPlayerClient::AudioTrackKindAlternative: | 
| 181         return AudioTrack::alternativeKeyword(); | 174         return AudioTrack::alternativeKeyword(); | 
| 182     case WebMediaPlayerClient::AudioTrackKindDescriptions: | 175     case WebMediaPlayerClient::AudioTrackKindDescriptions: | 
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 335     , m_processingPreferenceChange(false) | 328     , m_processingPreferenceChange(false) | 
| 336     , m_remoteRoutesAvailable(false) | 329     , m_remoteRoutesAvailable(false) | 
| 337     , m_playingRemotely(false) | 330     , m_playingRemotely(false) | 
| 338     , m_isFinalizing(false) | 331     , m_isFinalizing(false) | 
| 339     , m_initialPlayWithoutUserGesture(false) | 332     , m_initialPlayWithoutUserGesture(false) | 
| 340     , m_autoplayMediaCounted(false) | 333     , m_autoplayMediaCounted(false) | 
| 341     , m_inOverlayFullscreenVideo(false) | 334     , m_inOverlayFullscreenVideo(false) | 
| 342     , m_audioTracks(AudioTrackList::create(*this)) | 335     , m_audioTracks(AudioTrackList::create(*this)) | 
| 343     , m_videoTracks(VideoTrackList::create(*this)) | 336     , m_videoTracks(VideoTrackList::create(*this)) | 
| 344     , m_textTracks(nullptr) | 337     , m_textTracks(nullptr) | 
| 345 #if ENABLE(WEB_AUDIO) |  | 
| 346     , m_audioSourceNode(nullptr) | 338     , m_audioSourceNode(nullptr) | 
| 347 #endif |  | 
| 348     , m_autoplayHelper(*this) | 339     , m_autoplayHelper(*this) | 
| 349 { | 340 { | 
| 350 #if ENABLE(OILPAN) | 341 #if ENABLE(OILPAN) | 
| 351     ThreadState::current()->registerPreFinalizer(this); | 342     ThreadState::current()->registerPreFinalizer(this); | 
| 352 #endif | 343 #endif | 
| 353     ASSERT(RuntimeEnabledFeatures::mediaEnabled()); | 344     ASSERT(RuntimeEnabledFeatures::mediaEnabled()); | 
| 354 | 345 | 
| 355     WTF_LOG(Media, "HTMLMediaElement::HTMLMediaElement(%p)", this); | 346     WTF_LOG(Media, "HTMLMediaElement::HTMLMediaElement(%p)", this); | 
| 356 | 347 | 
| 357     if (document.settings() && document.settings()->mediaPlaybackRequiresUserGes
      ture()) | 348     if (document.settings() && document.settings()->mediaPlaybackRequiresUserGes
      ture()) | 
| (...skipping 30 matching lines...) Expand all  Loading... | 
| 388     // FrameLoader::checkCompleted(). To prevent load event dispatching during | 379     // FrameLoader::checkCompleted(). To prevent load event dispatching during | 
| 389     // object destruction, we use Document::incrementLoadEventDelayCount(). | 380     // object destruction, we use Document::incrementLoadEventDelayCount(). | 
| 390     // See http://crbug.com/275223 for more details. | 381     // See http://crbug.com/275223 for more details. | 
| 391     document().incrementLoadEventDelayCount(); | 382     document().incrementLoadEventDelayCount(); | 
| 392 | 383 | 
| 393     clearMediaPlayerAndAudioSourceProviderClientWithoutLocking(); | 384     clearMediaPlayerAndAudioSourceProviderClientWithoutLocking(); | 
| 394 | 385 | 
| 395     document().decrementLoadEventDelayCount(); | 386     document().decrementLoadEventDelayCount(); | 
| 396 #endif | 387 #endif | 
| 397 | 388 | 
| 398 #if ENABLE(WEB_AUDIO) |  | 
| 399     // m_audioSourceNode is explicitly cleared by AudioNode::dispose(). | 389     // m_audioSourceNode is explicitly cleared by AudioNode::dispose(). | 
| 400     // Since AudioNode::dispose() is guaranteed to be always called before | 390     // Since AudioNode::dispose() is guaranteed to be always called before | 
| 401     // the AudioNode is destructed, m_audioSourceNode is explicitly cleared | 391     // the AudioNode is destructed, m_audioSourceNode is explicitly cleared | 
| 402     // even if the AudioNode and the HTMLMediaElement die together. | 392     // even if the AudioNode and the HTMLMediaElement die together. | 
| 403     ASSERT(!m_audioSourceNode); | 393     ASSERT(!m_audioSourceNode); | 
| 404 #endif |  | 
| 405 } | 394 } | 
| 406 | 395 | 
| 407 #if ENABLE(OILPAN) | 396 #if ENABLE(OILPAN) | 
| 408 void HTMLMediaElement::dispose() | 397 void HTMLMediaElement::dispose() | 
| 409 { | 398 { | 
| 410     // If the HTMLMediaElement dies with the Document we are not | 399     // If the HTMLMediaElement dies with the Document we are not | 
| 411     // allowed to touch the Document to adjust delay load event counts | 400     // allowed to touch the Document to adjust delay load event counts | 
| 412     // from the destructor, as the Document could have been already | 401     // from the destructor, as the Document could have been already | 
| 413     // destructed. | 402     // destructed. | 
| 414     // | 403     // | 
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 926         return; | 915         return; | 
| 927     } | 916     } | 
| 928 | 917 | 
| 929     // The resource fetch algorithm | 918     // The resource fetch algorithm | 
| 930     setNetworkState(NETWORK_LOADING); | 919     setNetworkState(NETWORK_LOADING); | 
| 931 | 920 | 
| 932     // Set m_currentSrc *before* changing to the cache url, the fact that we are
       loading from the app | 921     // Set m_currentSrc *before* changing to the cache url, the fact that we are
       loading from the app | 
| 933     // cache is an internal detail not exposed through the media element API. | 922     // cache is an internal detail not exposed through the media element API. | 
| 934     m_currentSrc = url; | 923     m_currentSrc = url; | 
| 935 | 924 | 
| 936 #if ENABLE(WEB_AUDIO) |  | 
| 937     if (m_audioSourceNode) | 925     if (m_audioSourceNode) | 
| 938         m_audioSourceNode->onCurrentSrcChanged(m_currentSrc); | 926         m_audioSourceNode->onCurrentSrcChanged(m_currentSrc); | 
| 939 #endif |  | 
| 940 | 927 | 
| 941     WTF_LOG(Media, "HTMLMediaElement::loadResource(%p) - m_currentSrc -> %s", th
      is, urlForLoggingMedia(m_currentSrc).utf8().data()); | 928     WTF_LOG(Media, "HTMLMediaElement::loadResource(%p) - m_currentSrc -> %s", th
      is, urlForLoggingMedia(m_currentSrc).utf8().data()); | 
| 942 | 929 | 
| 943     startProgressEventTimer(); | 930     startProgressEventTimer(); | 
| 944 | 931 | 
| 945     // Reset display mode to force a recalculation of what to show because we ar
      e resetting the player. | 932     // Reset display mode to force a recalculation of what to show because we ar
      e resetting the player. | 
| 946     setDisplayMode(Unknown); | 933     setDisplayMode(Unknown); | 
| 947 | 934 | 
| 948     setPlayerPreload(); | 935     setPlayerPreload(); | 
| 949 | 936 | 
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1025 | 1012 | 
| 1026     KURL kurl(ParsedURLString, requestURL); | 1013     KURL kurl(ParsedURLString, requestURL); | 
| 1027     m_webMediaPlayer = frame->loader().client()->createWebMediaPlayer(*this, kur
      l, this); | 1014     m_webMediaPlayer = frame->loader().client()->createWebMediaPlayer(*this, kur
      l, this); | 
| 1028     if (!m_webMediaPlayer) { | 1015     if (!m_webMediaPlayer) { | 
| 1029         mediaLoadingFailed(WebMediaPlayer::NetworkStateFormatError); | 1016         mediaLoadingFailed(WebMediaPlayer::NetworkStateFormatError); | 
| 1030         return; | 1017         return; | 
| 1031     } | 1018     } | 
| 1032 | 1019 | 
| 1033     if (layoutObject()) | 1020     if (layoutObject()) | 
| 1034         layoutObject()->setShouldDoFullPaintInvalidation(); | 1021         layoutObject()->setShouldDoFullPaintInvalidation(); | 
| 1035 #if ENABLE(WEB_AUDIO) |  | 
| 1036     // Make sure if we create/re-create the WebMediaPlayer that we update our wr
      apper. | 1022     // Make sure if we create/re-create the WebMediaPlayer that we update our wr
      apper. | 
| 1037     m_audioSourceProvider.wrap(m_webMediaPlayer->audioSourceProvider()); | 1023     m_audioSourceProvider.wrap(m_webMediaPlayer->audioSourceProvider()); | 
| 1038 #endif |  | 
| 1039     m_webMediaPlayer->setVolume(effectiveMediaVolume()); | 1024     m_webMediaPlayer->setVolume(effectiveMediaVolume()); | 
| 1040 | 1025 | 
| 1041     m_webMediaPlayer->setPoster(posterImageURL()); | 1026     m_webMediaPlayer->setPoster(posterImageURL()); | 
| 1042 | 1027 | 
| 1043     m_webMediaPlayer->setPreload(effectivePreloadType()); | 1028     m_webMediaPlayer->setPreload(effectivePreloadType()); | 
| 1044 | 1029 | 
| 1045     m_webMediaPlayer->load(loadType(), kurl, corsMode()); | 1030     m_webMediaPlayer->load(loadType(), kurl, corsMode()); | 
| 1046 | 1031 | 
| 1047     if (isFullscreen()) { | 1032     if (isFullscreen()) { | 
| 1048         // This handles any transition to or from fullscreen overlay mode. | 1033         // This handles any transition to or from fullscreen overlay mode. | 
| (...skipping 1938 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2987 } | 2972 } | 
| 2988 | 2973 | 
| 2989 void HTMLMediaElement::stopPeriodicTimers() | 2974 void HTMLMediaElement::stopPeriodicTimers() | 
| 2990 { | 2975 { | 
| 2991     m_progressEventTimer.stop(); | 2976     m_progressEventTimer.stop(); | 
| 2992     m_playbackProgressTimer.stop(); | 2977     m_playbackProgressTimer.stop(); | 
| 2993 } | 2978 } | 
| 2994 | 2979 | 
| 2995 void HTMLMediaElement::clearMediaPlayerAndAudioSourceProviderClientWithoutLockin
      g() | 2980 void HTMLMediaElement::clearMediaPlayerAndAudioSourceProviderClientWithoutLockin
      g() | 
| 2996 { | 2981 { | 
| 2997 #if ENABLE(WEB_AUDIO) |  | 
| 2998     audioSourceProvider().setClient(nullptr); | 2982     audioSourceProvider().setClient(nullptr); | 
| 2999 #endif |  | 
| 3000     if (m_webMediaPlayer) { | 2983     if (m_webMediaPlayer) { | 
| 3001 #if ENABLE(WEB_AUDIO) |  | 
| 3002         m_audioSourceProvider.wrap(nullptr); | 2984         m_audioSourceProvider.wrap(nullptr); | 
| 3003 #endif |  | 
| 3004         m_webMediaPlayer.clear(); | 2985         m_webMediaPlayer.clear(); | 
| 3005     } | 2986     } | 
| 3006 } | 2987 } | 
| 3007 | 2988 | 
| 3008 void HTMLMediaElement::clearMediaPlayer(int flags) | 2989 void HTMLMediaElement::clearMediaPlayer(int flags) | 
| 3009 { | 2990 { | 
| 3010     forgetResourceSpecificTracks(); | 2991     forgetResourceSpecificTracks(); | 
| 3011 | 2992 | 
| 3012     closeMediaSource(); | 2993     closeMediaSource(); | 
| 3013 | 2994 | 
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3417 | 3398 | 
| 3418     { | 3399     { | 
| 3419         AudioSourceProviderClientLockScope scope(*this); | 3400         AudioSourceProviderClientLockScope scope(*this); | 
| 3420         clearMediaPlayerAndAudioSourceProviderClientWithoutLocking(); | 3401         clearMediaPlayerAndAudioSourceProviderClientWithoutLocking(); | 
| 3421     } | 3402     } | 
| 3422 | 3403 | 
| 3423     // We haven't yet found out if any remote routes are available. | 3404     // We haven't yet found out if any remote routes are available. | 
| 3424     m_remoteRoutesAvailable = false; | 3405     m_remoteRoutesAvailable = false; | 
| 3425     m_playingRemotely = false; | 3406     m_playingRemotely = false; | 
| 3426 | 3407 | 
| 3427 #if ENABLE(WEB_AUDIO) |  | 
| 3428     if (m_audioSourceNode) | 3408     if (m_audioSourceNode) | 
| 3429         audioSourceProvider().setClient(m_audioSourceNode); | 3409         audioSourceProvider().setClient(m_audioSourceNode); | 
| 3430 #endif |  | 
| 3431 } | 3410 } | 
| 3432 | 3411 | 
| 3433 #if ENABLE(WEB_AUDIO) |  | 
| 3434 void HTMLMediaElement::setAudioSourceNode(AudioSourceProviderClient* sourceNode) | 3412 void HTMLMediaElement::setAudioSourceNode(AudioSourceProviderClient* sourceNode) | 
| 3435 { | 3413 { | 
| 3436     ASSERT(isMainThread()); | 3414     ASSERT(isMainThread()); | 
| 3437     m_audioSourceNode = sourceNode; | 3415     m_audioSourceNode = sourceNode; | 
| 3438 | 3416 | 
| 3439     AudioSourceProviderClientLockScope scope(*this); | 3417     AudioSourceProviderClientLockScope scope(*this); | 
| 3440     audioSourceProvider().setClient(m_audioSourceNode); | 3418     audioSourceProvider().setClient(m_audioSourceNode); | 
| 3441 } | 3419 } | 
| 3442 #endif |  | 
| 3443 | 3420 | 
| 3444 void HTMLMediaElement::setAllowHiddenVolumeControls(bool allow) | 3421 void HTMLMediaElement::setAllowHiddenVolumeControls(bool allow) | 
| 3445 { | 3422 { | 
| 3446     ensureMediaControls(); | 3423     ensureMediaControls(); | 
| 3447     mediaControls()->setAllowHiddenVolumeControls(allow); | 3424     mediaControls()->setAllowHiddenVolumeControls(allow); | 
| 3448 } | 3425 } | 
| 3449 | 3426 | 
| 3450 WebMediaPlayer::CORSMode HTMLMediaElement::corsMode() const | 3427 WebMediaPlayer::CORSMode HTMLMediaElement::corsMode() const | 
| 3451 { | 3428 { | 
| 3452     const AtomicString& crossOriginMode = fastGetAttribute(crossoriginAttr); | 3429     const AtomicString& crossOriginMode = fastGetAttribute(crossoriginAttr); | 
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3503     visitor->trace(m_asyncEventQueue); | 3480     visitor->trace(m_asyncEventQueue); | 
| 3504     visitor->trace(m_error); | 3481     visitor->trace(m_error); | 
| 3505     visitor->trace(m_currentSourceNode); | 3482     visitor->trace(m_currentSourceNode); | 
| 3506     visitor->trace(m_nextChildNodeToConsider); | 3483     visitor->trace(m_nextChildNodeToConsider); | 
| 3507     visitor->trace(m_mediaSource); | 3484     visitor->trace(m_mediaSource); | 
| 3508     visitor->trace(m_audioTracks); | 3485     visitor->trace(m_audioTracks); | 
| 3509     visitor->trace(m_videoTracks); | 3486     visitor->trace(m_videoTracks); | 
| 3510     visitor->trace(m_cueTimeline); | 3487     visitor->trace(m_cueTimeline); | 
| 3511     visitor->trace(m_textTracks); | 3488     visitor->trace(m_textTracks); | 
| 3512     visitor->trace(m_textTracksWhenResourceSelectionBegan); | 3489     visitor->trace(m_textTracksWhenResourceSelectionBegan); | 
| 3513 #if ENABLE(WEB_AUDIO) |  | 
| 3514     visitor->trace(m_audioSourceProvider); | 3490     visitor->trace(m_audioSourceProvider); | 
| 3515     visitor->template registerWeakMembers<HTMLMediaElement, &HTMLMediaElement::c
      learWeakMembers>(this); | 3491     visitor->template registerWeakMembers<HTMLMediaElement, &HTMLMediaElement::c
      learWeakMembers>(this); | 
| 3516 #endif |  | 
| 3517     visitor->trace(m_autoplayHelper); | 3492     visitor->trace(m_autoplayHelper); | 
| 3518     HeapSupplementable<HTMLMediaElement>::trace(visitor); | 3493     HeapSupplementable<HTMLMediaElement>::trace(visitor); | 
| 3519 #endif | 3494 #endif | 
| 3520     HTMLElement::trace(visitor); | 3495     HTMLElement::trace(visitor); | 
| 3521     ActiveDOMObject::trace(visitor); | 3496     ActiveDOMObject::trace(visitor); | 
| 3522 } | 3497 } | 
| 3523 | 3498 | 
| 3524 void HTMLMediaElement::createPlaceholderTracksIfNecessary() | 3499 void HTMLMediaElement::createPlaceholderTracksIfNecessary() | 
| 3525 { | 3500 { | 
| 3526     if (!RuntimeEnabledFeatures::audioVideoTracksEnabled()) | 3501     if (!RuntimeEnabledFeatures::audioVideoTracksEnabled()) | 
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3582 { | 3557 { | 
| 3583     m_autoplayHelper.updatePositionNotificationRegistration(); | 3558     m_autoplayHelper.updatePositionNotificationRegistration(); | 
| 3584 } | 3559 } | 
| 3585 | 3560 | 
| 3586 // TODO(liberato): remove once autoplay gesture override experiment concludes. | 3561 // TODO(liberato): remove once autoplay gesture override experiment concludes. | 
| 3587 void HTMLMediaElement::triggerAutoplayViewportCheckForTesting() | 3562 void HTMLMediaElement::triggerAutoplayViewportCheckForTesting() | 
| 3588 { | 3563 { | 
| 3589     m_autoplayHelper.triggerAutoplayViewportCheckForTesting(); | 3564     m_autoplayHelper.triggerAutoplayViewportCheckForTesting(); | 
| 3590 } | 3565 } | 
| 3591 | 3566 | 
| 3592 #if ENABLE(WEB_AUDIO) |  | 
| 3593 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) | 3567 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) | 
| 3594 { | 3568 { | 
| 3595     if (!Heap::isHeapObjectAlive(m_audioSourceNode)) | 3569     if (!Heap::isHeapObjectAlive(m_audioSourceNode)) | 
| 3596         audioSourceProvider().setClient(nullptr); | 3570         audioSourceProvider().setClient(nullptr); | 
| 3597 } | 3571 } | 
| 3598 | 3572 | 
| 3599 void HTMLMediaElement::AudioSourceProviderImpl::wrap(WebAudioSourceProvider* pro
      vider) | 3573 void HTMLMediaElement::AudioSourceProviderImpl::wrap(WebAudioSourceProvider* pro
      vider) | 
| 3600 { | 3574 { | 
| 3601     MutexLocker locker(provideInputLock); | 3575     MutexLocker locker(provideInputLock); | 
| 3602 | 3576 | 
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3648 | 3622 | 
| 3649 DEFINE_TRACE(HTMLMediaElement::AudioClientImpl) | 3623 DEFINE_TRACE(HTMLMediaElement::AudioClientImpl) | 
| 3650 { | 3624 { | 
| 3651     visitor->trace(m_client); | 3625     visitor->trace(m_client); | 
| 3652 } | 3626 } | 
| 3653 | 3627 | 
| 3654 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl) | 3628 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl) | 
| 3655 { | 3629 { | 
| 3656     visitor->trace(m_client); | 3630     visitor->trace(m_client); | 
| 3657 } | 3631 } | 
| 3658 #endif |  | 
| 3659 | 3632 | 
| 3660 } | 3633 } | 
| OLD | NEW | 
|---|