| Index: third_party/WebKit/Source/core/html/HTMLMediaElement.h
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.h b/third_party/WebKit/Source/core/html/HTMLMediaElement.h
|
| index e6741a883068274ca5de8f7ed99653c217296099..a92da10c3751504be5ace4b9893e2f317a440d2d 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLMediaElement.h
|
| +++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.h
|
| @@ -26,8 +26,10 @@
|
| #ifndef HTMLMediaElement_h
|
| #define HTMLMediaElement_h
|
|
|
| +#include "bindings/core/v8/ScriptPromise.h"
|
| #include "core/CoreExport.h"
|
| #include "core/dom/ActiveDOMObject.h"
|
| +#include "core/dom/ExceptionCode.h"
|
| #include "core/events/GenericEventQueue.h"
|
| #include "core/html/AutoplayExperimentHelper.h"
|
| #include "core/html/HTMLElement.h"
|
| @@ -52,6 +54,7 @@ class KURL;
|
| class MediaControls;
|
| class MediaError;
|
| class HTMLMediaSource;
|
| +class ScriptState;
|
| class TextTrackContainer;
|
| class TextTrackList;
|
| class TimeRanges;
|
| @@ -136,7 +139,8 @@ public:
|
| bool shouldAutoplay(const RecordMetricsBehavior = RecordMetricsBehavior::DoNotRecord);
|
| bool loop() const;
|
| void setLoop(bool);
|
| - void play();
|
| + ScriptPromise playForBindings(ScriptState*);
|
| + Nullable<ExceptionCode> play();
|
| void pause();
|
| void requestRemotePlayback();
|
| void requestRemotePlaybackControl();
|
| @@ -445,6 +449,13 @@ private:
|
| // TODO(liberato): remove once autoplay gesture override experiment concludes.
|
| void triggerAutoplayViewportCheckForTesting();
|
|
|
| + void scheduleResolvePlayPromises();
|
| + void scheduleRejectPlayPromises(ExceptionCode, const String&);
|
| + void scheduleNotifyPlaying();
|
| +
|
| + void resolvePlayPromises();
|
| + void rejectPlayPromises(ExceptionCode, const String&);
|
| +
|
| UnthrottledTimer<HTMLMediaElement> m_loadTimer;
|
| UnthrottledTimer<HTMLMediaElement> m_progressEventTimer;
|
| UnthrottledTimer<HTMLMediaElement> m_playbackProgressTimer;
|
| @@ -553,6 +564,8 @@ private:
|
|
|
| OwnPtrWillBeMember<CueTimeline> m_cueTimeline;
|
|
|
| + PersistentHeapVectorWillBeHeapVector<Member<ScriptPromiseResolver>> m_playResolvers;
|
| +
|
| // This is a weak reference, since m_audioSourceNode holds a reference to us.
|
| // FIXME: Oilpan: Consider making this a strongly traced pointer with oilpan where strong cycles are not a problem.
|
| GC_PLUGIN_IGNORE("http://crbug.com/404577")
|
|
|