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(); |
+ } |
} |
} |