Chromium Code Reviews| Index: media/base/media_observer.h |
| diff --git a/media/base/media_observer.h b/media/base/media_observer.h |
| index c3e29a1789f173d2cc62ad12845392cfaf1a70f7..edf43b464e54f9418ab3a7a718158d11f4c1b799 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 { |
| + 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 video element and viewport changes. |
| + virtual void OnVideoViewportIntersectionChanged( |
|
miu
2016/11/21 21:07:03
naming nit: Just OnViewportIntersectionChanged (no
xjz
2016/11/21 23:58:42
Done.
|
| + 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; |