Index: content/browser/media/media_web_contents_observer.cc |
diff --git a/content/browser/media/media_web_contents_observer.cc b/content/browser/media/media_web_contents_observer.cc |
index 0591e25b73eaf5dcb8d5d1b5377f9708a6a38f77..562836ebc33dc4146289b094915afe17c857084d 100644 |
--- a/content/browser/media/media_web_contents_observer.cc |
+++ b/content/browser/media/media_web_contents_observer.cc |
@@ -41,6 +41,8 @@ bool MediaWebContentsObserver::OnMessageReceived( |
// TODO(dalecurtis): These should no longer be FrameHostMsg. |
IPC_BEGIN_MESSAGE_MAP_WITH_PARAM(MediaWebContentsObserver, msg, |
render_frame_host) |
+ IPC_MESSAGE_HANDLER(FrameHostMsg_MediaDestroyedNotification, |
+ OnMediaDestroyedNotification) |
IPC_MESSAGE_HANDLER(FrameHostMsg_MediaPlayingNotification, |
OnMediaPlayingNotification) |
IPC_MESSAGE_HANDLER(FrameHostMsg_MediaPausedNotification, |
@@ -50,12 +52,19 @@ bool MediaWebContentsObserver::OnMessageReceived( |
return handled; |
} |
+void MediaWebContentsObserver::OnMediaDestroyedNotification( |
+ RenderFrameHost* render_frame_host, |
+ int64_t player_cookie) { |
+ OnMediaPausedNotification(render_frame_host, player_cookie, true); |
+} |
+ |
void MediaWebContentsObserver::OnMediaPlayingNotification( |
RenderFrameHost* render_frame_host, |
int64_t player_cookie, |
bool has_video, |
bool has_audio, |
- bool is_remote) { |
+ bool is_remote, |
+ base::TimeDelta duration) { |
// Ignore the videos playing remotely and don't hold the wake lock for the |
// screen. TODO(dalecurtis): Is this correct? It means observers will not |
// receive play and pause messages. |
@@ -91,7 +100,8 @@ void MediaWebContentsObserver::OnMediaPlayingNotification( |
void MediaWebContentsObserver::OnMediaPausedNotification( |
RenderFrameHost* render_frame_host, |
- int64_t player_cookie) { |
+ int64_t player_cookie, |
+ bool reached_end_of_stream) { |
const MediaPlayerId id(render_frame_host, player_cookie); |
const bool removed_audio = RemoveMediaPlayerEntry(id, &active_audio_players_); |
const bool removed_video = RemoveMediaPlayerEntry(id, &active_video_players_); |