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

Unified Diff: third_party/WebKit/Source/modules/media_controls/MediaControlsRotateToFullscreenDelegate.cpp

Issue 2936413002: [Media Controls] Add UMA for rotate-to-fullscreen feature (Closed)
Patch Set: Add description Created 3 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/modules/media_controls/MediaControlsRotateToFullscreenDelegate.cpp
diff --git a/third_party/WebKit/Source/modules/media_controls/MediaControlsRotateToFullscreenDelegate.cpp b/third_party/WebKit/Source/modules/media_controls/MediaControlsRotateToFullscreenDelegate.cpp
index c5f5ce9b00dbf4fe231e7900afbe1f8d6480eb9d..cc9ab79d9b80447d3c9581e0bee2a229e3e87842 100644
--- a/third_party/WebKit/Source/modules/media_controls/MediaControlsRotateToFullscreenDelegate.cpp
+++ b/third_party/WebKit/Source/modules/media_controls/MediaControlsRotateToFullscreenDelegate.cpp
@@ -12,6 +12,7 @@
#include "core/html/HTMLVideoElement.h"
#include "core/page/ChromeClient.h"
#include "modules/media_controls/MediaControlsImpl.h"
+#include "public/platform/Platform.h"
#include "public/platform/WebScreenInfo.h"
namespace blink {
@@ -179,10 +180,15 @@ void MediaControlsRotateToFullscreenDelegate::OnScreenOrientationChange() {
bool should_be_fullscreen =
current_screen_orientation_ == video_orientation;
- if (should_be_fullscreen && !video_element_->IsFullscreen())
+ if (should_be_fullscreen && !video_element_->IsFullscreen()) {
+ Platform::Current()->RecordAction(
+ UserMetricsAction("Media.Video.RotateToFullscreen.Enter"));
media_controls.EnterFullscreen();
- else if (!should_be_fullscreen && video_element_->IsFullscreen())
+ } else if (!should_be_fullscreen && video_element_->IsFullscreen()) {
+ Platform::Current()->RecordAction(
+ UserMetricsAction("Media.Video.RotateToFullscreen.Exit"));
media_controls.ExitFullscreen();
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698