| 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 22 matching lines...) Expand all Loading... |
| 33 #include "core/dom/ExceptionCode.h" | 33 #include "core/dom/ExceptionCode.h" |
| 34 #include "core/events/GenericEventQueue.h" | 34 #include "core/events/GenericEventQueue.h" |
| 35 #include "core/html/AutoplayExperimentHelper.h" | 35 #include "core/html/AutoplayExperimentHelper.h" |
| 36 #include "core/html/HTMLElement.h" | 36 #include "core/html/HTMLElement.h" |
| 37 #include "core/html/track/TextTrack.h" | 37 #include "core/html/track/TextTrack.h" |
| 38 #include "platform/Supplementable.h" | 38 #include "platform/Supplementable.h" |
| 39 #include "platform/audio/AudioSourceProvider.h" | 39 #include "platform/audio/AudioSourceProvider.h" |
| 40 #include "public/platform/WebAudioSourceProviderClient.h" | 40 #include "public/platform/WebAudioSourceProviderClient.h" |
| 41 #include "public/platform/WebMediaPlayerClient.h" | 41 #include "public/platform/WebMediaPlayerClient.h" |
| 42 #include "public/platform/WebMimeRegistry.h" | 42 #include "public/platform/WebMimeRegistry.h" |
| 43 #include <memory> | |
| 44 | 43 |
| 45 namespace blink { | 44 namespace blink { |
| 46 | 45 |
| 47 class AudioSourceProviderClient; | 46 class AudioSourceProviderClient; |
| 48 class AudioTrackList; | 47 class AudioTrackList; |
| 49 class ContentType; | 48 class ContentType; |
| 50 class CueTimeline; | 49 class CueTimeline; |
| 51 class EnumerationHistogram; | 50 class EnumerationHistogram; |
| 52 class Event; | 51 class Event; |
| 53 class ExceptionState; | 52 class ExceptionState; |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 WaitingForStopDelayingLoadEventTask, | 540 WaitingForStopDelayingLoadEventTask, |
| 542 // The load is the deferred, and waiting for a triggering event. | 541 // The load is the deferred, and waiting for a triggering event. |
| 543 WaitingForTrigger, | 542 WaitingForTrigger, |
| 544 // The load is deferred, and waiting for the task to set the | 543 // The load is deferred, and waiting for the task to set the |
| 545 // delaying-the-load-event flag, after which the load will be executed. | 544 // delaying-the-load-event flag, after which the load will be executed. |
| 546 ExecuteOnStopDelayingLoadEventTask | 545 ExecuteOnStopDelayingLoadEventTask |
| 547 }; | 546 }; |
| 548 DeferredLoadState m_deferredLoadState; | 547 DeferredLoadState m_deferredLoadState; |
| 549 Timer<HTMLMediaElement> m_deferredLoadTimer; | 548 Timer<HTMLMediaElement> m_deferredLoadTimer; |
| 550 | 549 |
| 551 std::unique_ptr<WebMediaPlayer> m_webMediaPlayer; | 550 OwnPtr<WebMediaPlayer> m_webMediaPlayer; |
| 552 WebLayer* m_webLayer; | 551 WebLayer* m_webLayer; |
| 553 | 552 |
| 554 DisplayMode m_displayMode; | 553 DisplayMode m_displayMode; |
| 555 | 554 |
| 556 Member<HTMLMediaSource> m_mediaSource; | 555 Member<HTMLMediaSource> m_mediaSource; |
| 557 | 556 |
| 558 // Cached time value. Only valid when ready state is HAVE_METADATA or | 557 // Cached time value. Only valid when ready state is HAVE_METADATA or |
| 559 // higher, otherwise the current time is assumed to be zero. | 558 // higher, otherwise the current time is assumed to be zero. |
| 560 mutable double m_cachedTime; | 559 mutable double m_cachedTime; |
| 561 | 560 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 590 bool m_inOverlayFullscreenVideo : 1; | 589 bool m_inOverlayFullscreenVideo : 1; |
| 591 | 590 |
| 592 Member<AudioTrackList> m_audioTracks; | 591 Member<AudioTrackList> m_audioTracks; |
| 593 Member<VideoTrackList> m_videoTracks; | 592 Member<VideoTrackList> m_videoTracks; |
| 594 Member<TextTrackList> m_textTracks; | 593 Member<TextTrackList> m_textTracks; |
| 595 HeapVector<Member<TextTrack>> m_textTracksWhenResourceSelectionBegan; | 594 HeapVector<Member<TextTrack>> m_textTracksWhenResourceSelectionBegan; |
| 596 | 595 |
| 597 Member<CueTimeline> m_cueTimeline; | 596 Member<CueTimeline> m_cueTimeline; |
| 598 | 597 |
| 599 HeapVector<Member<ScriptPromiseResolver>> m_playPromiseResolvers; | 598 HeapVector<Member<ScriptPromiseResolver>> m_playPromiseResolvers; |
| 600 std::unique_ptr<CancellableTaskFactory> m_playPromiseResolveTask; | 599 OwnPtr<CancellableTaskFactory> m_playPromiseResolveTask; |
| 601 std::unique_ptr<CancellableTaskFactory> m_playPromiseRejectTask; | 600 OwnPtr<CancellableTaskFactory> m_playPromiseRejectTask; |
| 602 HeapVector<Member<ScriptPromiseResolver>> m_playPromiseResolveList; | 601 HeapVector<Member<ScriptPromiseResolver>> m_playPromiseResolveList; |
| 603 HeapVector<Member<ScriptPromiseResolver>> m_playPromiseRejectList; | 602 HeapVector<Member<ScriptPromiseResolver>> m_playPromiseRejectList; |
| 604 ExceptionCode m_playPromiseErrorCode; | 603 ExceptionCode m_playPromiseErrorCode; |
| 605 | 604 |
| 606 // This is a weak reference, since m_audioSourceNode holds a reference to us
. | 605 // This is a weak reference, since m_audioSourceNode holds a reference to us
. |
| 607 // TODO(Oilpan): Consider making this a strongly traced pointer with oilpan
where strong cycles are not a problem. | 606 // TODO(Oilpan): Consider making this a strongly traced pointer with oilpan
where strong cycles are not a problem. |
| 608 GC_PLUGIN_IGNORE("http://crbug.com/404577") | 607 GC_PLUGIN_IGNORE("http://crbug.com/404577") |
| 609 WeakMember<AudioSourceProviderClient> m_audioSourceNode; | 608 WeakMember<AudioSourceProviderClient> m_audioSourceNode; |
| 610 | 609 |
| 611 // AudioClientImpl wraps an AudioSourceProviderClient. | 610 // AudioClientImpl wraps an AudioSourceProviderClient. |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 inline bool isHTMLMediaElement(const HTMLElement& element) | 674 inline bool isHTMLMediaElement(const HTMLElement& element) |
| 676 { | 675 { |
| 677 return isHTMLAudioElement(element) || isHTMLVideoElement(element); | 676 return isHTMLAudioElement(element) || isHTMLVideoElement(element); |
| 678 } | 677 } |
| 679 | 678 |
| 680 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 679 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
| 681 | 680 |
| 682 } // namespace blink | 681 } // namespace blink |
| 683 | 682 |
| 684 #endif // HTMLMediaElement_h | 683 #endif // HTMLMediaElement_h |
| OLD | NEW |