Chromium Code Reviews| 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 610750d1bc2b8dc29b87058bb2cdf346f9ae84a7..4e0911eae4975d83b044f35031d0a88337c5757b 100644 |
| --- a/third_party/WebKit/Source/core/html/HTMLMediaElement.h |
| +++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.h |
| @@ -68,11 +68,6 @@ class CORE_EXPORT HTMLMediaElement : public HTMLElement, public WillBeHeapSupple |
| public: |
| static WebMimeRegistry::SupportsType supportsType(const ContentType&); |
| - enum class RecordMetricsBehavior { |
|
philipj_slow
2016/02/25 10:53:49
Given that's it's used for other things as well no
liberato (no reviews please)
2016/02/25 15:30:31
Done. luckily, the autoplay helper only ever sent
|
| - DoNotRecord, |
| - DoRecord |
| - }; |
| - |
| static void setMediaStreamRegistry(URLRegistry*); |
| static bool isMediaStreamURL(const String& url); |
| @@ -137,6 +132,7 @@ public: |
| TimeRanges* seekable() const; |
| bool ended() const; |
| bool autoplay() const; |
| + using RecordMetricsBehavior = AutoplayExperimentHelper::Client::RecordMetricsBehavior; |
| bool shouldAutoplay(const RecordMetricsBehavior = RecordMetricsBehavior::DoNotRecord); |
| bool loop() const; |
| void setLoop(bool); |
| @@ -274,6 +270,8 @@ protected: |
| DisplayMode displayMode() const { return m_displayMode; } |
| virtual void setDisplayMode(DisplayMode mode) { m_displayMode = mode; } |
| + void recordAutoplayMetric(AutoplayMetrics); |
| + |
| private: |
| void resetMediaPlayerAndMediaSource(); |
| @@ -379,14 +377,6 @@ private: |
| // This does not change the buffering strategy. |
| void pauseInternal(); |
| - // If we are about to enter a paused state, call this to record |
| - // autoplay metrics. If we were already in a stopped state, then |
| - // this does nothing. |
| - void recordMetricsIfPausing(); |
| - // Could stopping at this point be considered a bailout of playback? |
| - // (as in, "The user really didn't want to play this"). |
| - bool isBailout() const; |
| - void autoplayMediaEncountered(); |
| void allowVideoRendering(); |
| void updateVolume(); |
| @@ -418,8 +408,6 @@ private: |
| void setAllowHiddenVolumeControls(bool); |
| - void recordAutoplayMetric(AutoplayMetrics); |
| - |
| WebMediaPlayer::CORSMode corsMode() const; |
| // Returns the "direction of playback" value as specified in the HTML5 spec. |
| @@ -439,8 +427,11 @@ private: |
| // Return true if and only if we require a user gesture before letting |
| // the media play. |
| bool isUserGestureRequiredForPlay() const; |
| + |
| + // If the user gesture is required, then this will remove it. Note that |
| + // one should not generally call this method directly; use the one on |
| + // m_helper and give it a reason. |
| void removeUserGestureRequirement(); |
| - void setInitialPlayWithoutUserGestures(bool); |
| void setNetworkState(NetworkState); |
| @@ -545,8 +536,6 @@ private: |
| bool m_remoteRoutesAvailable : 1; |
| bool m_playingRemotely : 1; |
| bool m_isFinalizing : 1; |
| - bool m_initialPlayWithoutUserGesture : 1; |
| - bool m_autoplayMediaCounted : 1; |
| // Whether this element is in overlay fullscreen mode. |
| bool m_inOverlayFullscreenVideo : 1; |
| @@ -611,12 +600,15 @@ private: |
| AudioSourceProviderImpl m_audioSourceProvider; |
| + class AutoplayHelperClientImpl; |
| + |
| friend class Internals; |
| friend class TrackDisplayUpdateScope; |
| friend class AutoplayExperimentHelper; |
| friend class MediaControlsTest; |
| - AutoplayExperimentHelper m_autoplayHelper; |
| + OwnPtrWillBeMember<AutoplayExperimentHelper::Client> m_autoplayHelperClient; |
| + OwnPtrWillBeMember<AutoplayExperimentHelper> m_autoplayHelper; |
| static URLRegistry* s_mediaStreamRegistry; |
| }; |