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

Unified Diff: media/base/media_observer.h

Issue 2511143006: Detect change on the intersection of video and viewport. (Closed)
Patch Set: Addressed miu's comments. 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
Index: media/base/media_observer.h
diff --git a/media/base/media_observer.h b/media/base/media_observer.h
index c3e29a1789f173d2cc62ad12845392cfaf1a70f7..24c0180989db42f6008e690a6d6fbdea93a3b45d 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,10 +17,22 @@ class MEDIA_EXPORT MediaObserver {
MediaObserver();
virtual ~MediaObserver();
+ struct ViewportIntersectionInfo {
szager1 2016/11/23 17:44:58 As we mentioned in the meeting, we'd prefer not to
ojan 2016/11/23 18:43:43 To expand on this a bit, my mental model is that w
xjz 2016/11/23 23:43:25 Done.
xjz 2016/11/23 23:43:25 As szager1 suggested, moved the logic determining
+ ViewportIntersectionInfo() {}
+ ~ViewportIntersectionInfo() {}
+
+ 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 intersection of the media element and viewport changes.
+ virtual void OnViewportIntersectionChanged(
+ const ViewportIntersectionInfo& info) {}
+
// Called when CDM is attached to the media element. The |cdm_context| is
// only guaranteed to be valid in this call.
virtual void OnSetCdm(CdmContext* cdm_context) = 0;
« no previous file with comments | « no previous file | media/blink/webmediaplayer_impl.h » ('j') | third_party/WebKit/Source/core/dom/IntersectionGeometry.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698