Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1800)

Unified Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.h

Issue 1470153004: Autoplay experiment metric fixes and additions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moved RecordMetricsBehavior back into HTMLMediaElement Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..58af9f02a17e38a4d0810bdd01473c5c7eef2305 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.h
@@ -274,6 +274,8 @@ protected:
DisplayMode displayMode() const { return m_displayMode; }
virtual void setDisplayMode(DisplayMode mode) { m_displayMode = mode; }
+ void recordAutoplayMetric(AutoplayMetrics);
+
private:
void resetMediaPlayerAndMediaSource();
@@ -379,14 +381,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 +412,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 +431,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 +540,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 +604,15 @@ private:
AudioSourceProviderImpl m_audioSourceProvider;
+ class AutoplayHelperClientImpl;
sof 2016/02/25 18:55:44 Let's just leave this out (and make HTMLMediaEleme
liberato (no reviews please) 2016/03/14 17:09:13 it accesses private members, so it would need a fr
+
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;
};

Powered by Google App Engine
This is Rietveld 408576698