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

Unified Diff: media/base/media_observer.h

Issue 2475643004: Monitor the intersection of video and viewport. (Closed)
Patch Set: Addressed comments. Observe intersection changing. Created 4 years, 1 month 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
« no previous file with comments | « no previous file | media/blink/webmediaplayer_impl.h » ('j') | media/blink/webmediaplayer_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/media_observer.h
diff --git a/media/base/media_observer.h b/media/base/media_observer.h
index c3e29a1789f173d2cc62ad12845392cfaf1a70f7..d5b214cdb945198408db5780a5d99d860a0b0e5d 100644
--- a/media/base/media_observer.h
+++ b/media/base/media_observer.h
@@ -7,6 +7,7 @@
#include "media/base/cdm_context.h"
#include "media/base/pipeline_metadata.h"
+#include "ui/gfx/geometry/rect.h"
namespace media {
@@ -16,9 +17,21 @@ class MEDIA_EXPORT MediaObserver {
MediaObserver();
virtual ~MediaObserver();
+ struct ViewportIntersectionInfo {
+ ViewportIntersectionInfo() {}
+ ~ViewportIntersectionInfo() {}
+
+ float ratio = 0;
+ gfx::Rect root_rect;
+ gfx::Rect intersect_rect;
+ };
+
// Called when the media element entered/exited fullscreen.
virtual void OnEnteredFullscreen() = 0;
virtual void OnExitedFullscreen() = 0;
+ // Called when the video/viewport ratio changed.
+ virtual void OnVideoViewportIntersectionChanged(
+ const ViewportIntersectionInfo& info) {}
// Called when CDM is attached to the media element. The |cdm_context| is
// only guaranteed to be valid in this call.
« no previous file with comments | « no previous file | media/blink/webmediaplayer_impl.h » ('j') | media/blink/webmediaplayer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698