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

Unified Diff: media/blink/webmediaplayer_impl.cc

Issue 2389473002: Media Remoting: Add RemotingController. (Closed)
Patch Set: Rebased. Created 4 years, 2 months 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 | « media/blink/webmediaplayer_impl.h ('k') | media/blink/webmediaplayer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/webmediaplayer_impl.cc
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
index cdebe7739579127cc1db0a4aadd49269324e37b7..e67b8033e7dc0842e5bb4109aeb099e6a32a10f2 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -227,7 +227,8 @@ WebMediaPlayerImpl::WebMediaPlayerImpl(
suppress_destruction_errors_(false),
can_suspend_state_(CanSuspendState::UNKNOWN),
is_encrypted_(false),
- underflow_count_(0) {
+ underflow_count_(0),
+ observer_(params.media_observer()) {
DCHECK(!adjust_allocated_memory_cb_.is_null());
DCHECK(renderer_factory_);
DCHECK(client_);
@@ -334,11 +335,15 @@ void WebMediaPlayerImpl::DisableOverlay() {
void WebMediaPlayerImpl::enteredFullscreen() {
if (!force_video_overlays_ && !disable_fullscreen_video_overlays_)
EnableOverlay();
+ if (observer_)
+ observer_->OnEnteredFullscreen();
}
void WebMediaPlayerImpl::exitedFullscreen() {
if (!force_video_overlays_ && !disable_fullscreen_video_overlays_)
DisableOverlay();
+ if (observer_)
+ observer_->OnExitedFullscreen();
}
void WebMediaPlayerImpl::DoLoad(LoadType load_type,
@@ -959,6 +964,9 @@ void WebMediaPlayerImpl::SetCdm(blink::WebContentDecryptionModule* cdm) {
return;
}
+ if (observer_)
+ observer_->OnSetCdm(cdm_context);
+
// Keep the reference to the CDM, as it shouldn't be destroyed until
// after the pipeline is done with the |cdm_context|.
pending_cdm_ = std::move(cdm_reference);
@@ -1112,6 +1120,9 @@ void WebMediaPlayerImpl::OnMetadata(PipelineMetadata metadata) {
client_->setWebLayer(video_weblayer_.get());
}
+ if (observer_)
+ observer_->OnMetadataChanged(metadata);
+
CreateWatchTimeReporter();
UpdatePlayState();
}
« no previous file with comments | « media/blink/webmediaplayer_impl.h ('k') | media/blink/webmediaplayer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698