Index: media/blink/webmediaplayer_impl.h |
diff --git a/media/blink/webmediaplayer_impl.h b/media/blink/webmediaplayer_impl.h |
index da0d8b6c1bd984d3c0b010a635e30ca7f7ce414a..d379d1d3fc822a901e953c7fce27afae15912c1b 100644 |
--- a/media/blink/webmediaplayer_impl.h |
+++ b/media/blink/webmediaplayer_impl.h |
@@ -44,6 +44,8 @@ |
#include "third_party/WebKit/public/platform/WebAudioSourceProvider.h" |
#include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h" |
#include "third_party/WebKit/public/platform/WebMediaPlayer.h" |
+#include "third_party/WebKit/public/platform/WebSurfaceLayerBridgeObserver.h" |
+#include "third_party/WebKit/public/platform/WebVideoSurfaceLayerBridge.h" |
#include "url/gurl.h" |
#if defined(OS_ANDROID) // WMPI_CAST |
@@ -89,6 +91,7 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl |
: public NON_EXPORTED_BASE(blink::WebMediaPlayer), |
public NON_EXPORTED_BASE(WebMediaPlayerDelegate::Observer), |
public NON_EXPORTED_BASE(Pipeline::Client), |
+ public NON_EXPORTED_BASE(blink::WebSurfaceLayerBridgeObserver), |
public MediaObserverClient, |
public base::SupportsWeakPtr<WebMediaPlayerImpl> { |
public: |
@@ -230,6 +233,9 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl |
void SwitchRenderer(bool is_rendered_remotely) override; |
void ActivateViewportIntersectionMonitoring(bool activate) override; |
+ // WebSurfaceLayerBridgeObserver implementation. |
+ void OnWebLayerReplaced() override; |
enne (OOO)
2017/06/26 18:35:58
I think the only reason that CanvasSurfaceLayerBri
liberato (no reviews please)
2017/06/26 22:39:30
+1. that's what i tried, badly, to say in my prev
CJ
2017/06/29 19:51:33
This looks good, but what happens when we are upda
|
+ |
// Called from WebMediaPlayerCast. |
// TODO(hubbe): WMPI_CAST make private. |
void OnPipelineSeeked(bool time_updated); |
@@ -721,6 +727,9 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl |
// Monitors the player events. |
base::WeakPtr<MediaObserver> observer_; |
+ // Obtains and maintains SurfaceIds. |
+ std::unique_ptr<blink::WebVideoSurfaceLayerBridge> bridge_; |
+ |
// The maximum video keyframe distance that allows triggering background |
// playback optimizations (non-MSE). |
base::TimeDelta max_keyframe_distance_to_disable_background_video_; |