| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/renderer/media/android/webmediaplayer_proxy_android.h" | 5 #include "content/renderer/media/android/webmediaplayer_proxy_android.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "content/common/media/media_player_messages_android.h" | 9 #include "content/common/media/media_player_messages_android.h" |
| 10 #include "content/renderer/media/android/renderer_media_player_manager.h" | 10 #include "content/renderer/media/android/renderer_media_player_manager.h" |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 void WebMediaPlayerProxyAndroid::EnterFullscreen(int player_id) { | 171 void WebMediaPlayerProxyAndroid::EnterFullscreen(int player_id) { |
| 172 Send(new MediaPlayerHostMsg_EnterFullscreen(routing_id(), player_id)); | 172 Send(new MediaPlayerHostMsg_EnterFullscreen(routing_id(), player_id)); |
| 173 } | 173 } |
| 174 | 174 |
| 175 void WebMediaPlayerProxyAndroid::ExitFullscreen(int player_id) { | 175 void WebMediaPlayerProxyAndroid::ExitFullscreen(int player_id) { |
| 176 Send(new MediaPlayerHostMsg_ExitFullscreen(routing_id(), player_id)); | 176 Send(new MediaPlayerHostMsg_ExitFullscreen(routing_id(), player_id)); |
| 177 } | 177 } |
| 178 | 178 |
| 179 void WebMediaPlayerProxyAndroid::ReadFromDemuxerAck( | 179 void WebMediaPlayerProxyAndroid::ReadFromDemuxerAck( |
| 180 int player_id, | 180 int player_id, |
| 181 const media::MediaPlayerHostMsg_ReadFromDemuxerAck_Params& params) { | 181 const media::MediaData& data) { |
| 182 Send(new MediaPlayerHostMsg_ReadFromDemuxerAck( | 182 Send(new MediaPlayerHostMsg_ReadFromDemuxerAck( |
| 183 routing_id(), player_id, params)); | 183 routing_id(), player_id, data)); |
| 184 } | 184 } |
| 185 | 185 |
| 186 void WebMediaPlayerProxyAndroid::SeekRequestAck(int player_id, | 186 void WebMediaPlayerProxyAndroid::SeekRequestAck(int player_id, |
| 187 unsigned seek_request_id) { | 187 unsigned seek_request_id) { |
| 188 Send(new MediaPlayerHostMsg_MediaSeekRequestAck( | 188 Send(new MediaPlayerHostMsg_MediaSeekRequestAck( |
| 189 routing_id(), player_id, seek_request_id)); | 189 routing_id(), player_id, seek_request_id)); |
| 190 } | 190 } |
| 191 | 191 |
| 192 #if defined(GOOGLE_TV) | 192 #if defined(GOOGLE_TV) |
| 193 void WebMediaPlayerProxyAndroid::RequestExternalSurface( | 193 void WebMediaPlayerProxyAndroid::RequestExternalSurface( |
| (...skipping 18 matching lines...) Expand all Loading... |
| 212 void WebMediaPlayerProxyAndroid::OnReadFromDemuxer( | 212 void WebMediaPlayerProxyAndroid::OnReadFromDemuxer( |
| 213 int player_id, | 213 int player_id, |
| 214 media::DemuxerStream::Type type) { | 214 media::DemuxerStream::Type type) { |
| 215 WebMediaPlayerAndroid* player = GetWebMediaPlayer(player_id); | 215 WebMediaPlayerAndroid* player = GetWebMediaPlayer(player_id); |
| 216 if (player) | 216 if (player) |
| 217 player->OnReadFromDemuxer(type); | 217 player->OnReadFromDemuxer(type); |
| 218 } | 218 } |
| 219 | 219 |
| 220 void WebMediaPlayerProxyAndroid::DemuxerReady( | 220 void WebMediaPlayerProxyAndroid::DemuxerReady( |
| 221 int player_id, | 221 int player_id, |
| 222 const media::MediaPlayerHostMsg_DemuxerReady_Params& params) { | 222 const media::MediaConfigs& configs) { |
| 223 Send(new MediaPlayerHostMsg_DemuxerReady(routing_id(), player_id, params)); | 223 Send(new MediaPlayerHostMsg_DemuxerReady(routing_id(), player_id, configs)); |
| 224 } | 224 } |
| 225 | 225 |
| 226 void WebMediaPlayerProxyAndroid::DurationChanged( | 226 void WebMediaPlayerProxyAndroid::DurationChanged( |
| 227 int player_id, | 227 int player_id, |
| 228 const base::TimeDelta& duration) { | 228 const base::TimeDelta& duration) { |
| 229 Send(new MediaPlayerHostMsg_DurationChanged( | 229 Send(new MediaPlayerHostMsg_DurationChanged( |
| 230 routing_id(), player_id, duration)); | 230 routing_id(), player_id, duration)); |
| 231 } | 231 } |
| 232 | 232 |
| 233 void WebMediaPlayerProxyAndroid::InitializeCDM(int media_keys_id, | 233 void WebMediaPlayerProxyAndroid::InitializeCDM(int media_keys_id, |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 int media_keys_id, | 300 int media_keys_id, |
| 301 const std::string& session_id, | 301 const std::string& session_id, |
| 302 const std::vector<uint8>& message, | 302 const std::vector<uint8>& message, |
| 303 const std::string& destination_url) { | 303 const std::string& destination_url) { |
| 304 WebMediaPlayerAndroid* player = GetWebMediaPlayer(media_keys_id); | 304 WebMediaPlayerAndroid* player = GetWebMediaPlayer(media_keys_id); |
| 305 if (player) | 305 if (player) |
| 306 player->OnKeyMessage(session_id, message, destination_url); | 306 player->OnKeyMessage(session_id, message, destination_url); |
| 307 } | 307 } |
| 308 | 308 |
| 309 } // namespace content | 309 } // namespace content |
| OLD | NEW |