| Index: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
|
| index b74c1712b8213aeee3b47506b7dedc20aa071ea5..8cb346f0b711cb3da6f8e2b0aa04650ca6c4944f 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
|
| @@ -130,6 +130,7 @@ constexpr float kMostlyFillViewportThreshold = 0.85f;
|
| constexpr double kMostlyFillViewportBecomeStableSeconds = 5;
|
| constexpr double kCheckViewportIntersectionIntervalSeconds = 1;
|
|
|
| +// This enum is used to record histograms. Do not reorder.
|
| enum MediaControlsShow {
|
| MediaControlsShowAttribute = 0,
|
| MediaControlsShowFullscreen,
|
| @@ -139,6 +140,13 @@ enum MediaControlsShow {
|
| MediaControlsShowMax
|
| };
|
|
|
| +// This enum is used to record histograms. Do not reorder.
|
| +enum VideoPersistenceControlsType {
|
| + VideoPersistenceControlsTypeNative = 0,
|
| + VideoPersistenceControlsTypeCustom,
|
| + VideoPersistenceControlsTypeCount
|
| +};
|
| +
|
| String urlForLoggingMedia(const KURL& url) {
|
| static const unsigned maximumURLLengthForLogging = 128;
|
|
|
| @@ -3242,6 +3250,17 @@ void HTMLMediaElement::onBecamePersistentVideo(bool value) {
|
| return;
|
|
|
| if (value) {
|
| + // Record the type of video. If it is already fullscreen, it is a video with
|
| + // native controls, otherwise it is assumed to be with custom controls.
|
| + // This is only recorded when entering this mode.
|
| + DEFINE_STATIC_LOCAL(EnumerationHistogram, histogram,
|
| + ("Media.VideoPersistence.ControlsType",
|
| + VideoPersistenceControlsTypeCount));
|
| + if (isFullscreen())
|
| + histogram.count(VideoPersistenceControlsTypeNative);
|
| + else
|
| + histogram.count(VideoPersistenceControlsTypeCustom);
|
| +
|
| if (isFullscreen())
|
| return;
|
|
|
|
|