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