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

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

Issue 2091253002: When autoplaying muted video, record when unmute happen and the result. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments and rebase Created 4 years, 6 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 282b0fae379e98ae19c87e05ddba06d8669e3091..9863e39251d31afb640160653852f921101638df 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.h
@@ -298,6 +298,13 @@ protected:
void recordAutoplayMetric(AutoplayMetrics);
private:
+ // These values are used for histograms. Do not reorder.
+ enum AutoplayUnmuteActionStatus {
+ AutoplayUnmuteActionFailure = 0,
+ AutoplayUnmuteActionSuccess = 1,
+ AutoplayUnmuteActionMax
+ };
+
void resetMediaPlayerAndMediaSource();
bool alwaysCreateUserAgentShadowRoot() const final { return true; }
@@ -493,6 +500,7 @@ private:
EnumerationHistogram& showControlsHistogram() const;
void recordAutoplaySourceMetric(int source);
+ void recordAutoplayUnmuteStatus(AutoplayUnmuteActionStatus);
void onVisibilityChangedForAutoplay(bool isVisible);

Powered by Google App Engine
This is Rietveld 408576698