| 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/renderer_media_player_manager.h" | 5 #include "content/renderer/media/android/renderer_media_player_manager.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/proxy_media_keys.h" | 10 #include "content/renderer/media/android/proxy_media_keys.h" |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 Send(new MediaKeysHostMsg_UpdateSession( | 263 Send(new MediaKeysHostMsg_UpdateSession( |
| 264 routing_id(), media_keys_id, session_id, response)); | 264 routing_id(), media_keys_id, session_id, response)); |
| 265 } | 265 } |
| 266 | 266 |
| 267 void RendererMediaPlayerManager::ReleaseSession(int media_keys_id, | 267 void RendererMediaPlayerManager::ReleaseSession(int media_keys_id, |
| 268 uint32 session_id) { | 268 uint32 session_id) { |
| 269 Send(new MediaKeysHostMsg_ReleaseSession( | 269 Send(new MediaKeysHostMsg_ReleaseSession( |
| 270 routing_id(), media_keys_id, session_id)); | 270 routing_id(), media_keys_id, session_id)); |
| 271 } | 271 } |
| 272 | 272 |
| 273 void RendererMediaPlayerManager::CancelAllPendingSessionCreations( | 273 void RendererMediaPlayerManager::DestroyCdm(int media_keys_id) { |
| 274 int media_keys_id) { | 274 Send(new MediaKeysHostMsg_DestroyCdm(routing_id(), media_keys_id)); |
| 275 Send(new MediaKeysHostMsg_CancelAllPendingSessionCreations( | |
| 276 routing_id(), media_keys_id)); | |
| 277 } | 275 } |
| 278 | 276 |
| 279 void RendererMediaPlayerManager::OnSessionCreated( | 277 void RendererMediaPlayerManager::OnSessionCreated( |
| 280 int media_keys_id, | 278 int media_keys_id, |
| 281 uint32 session_id, | 279 uint32 session_id, |
| 282 const std::string& web_session_id) { | 280 const std::string& web_session_id) { |
| 283 if (web_session_id.length() > kEmeWebSessionIdMaximum) { | 281 if (web_session_id.length() > kEmeWebSessionIdMaximum) { |
| 284 OnSessionError( | 282 OnSessionError( |
| 285 media_keys_id, session_id, media::MediaKeys::kUnknownError, 0); | 283 media_keys_id, session_id, media::MediaKeys::kUnknownError, 0); |
| 286 return; | 284 return; |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 | 432 |
| 435 if (player && player->hasVideo()) { | 433 if (player && player->hasVideo()) { |
| 436 if (player->UpdateBoundaryRectangle()) | 434 if (player->UpdateBoundaryRectangle()) |
| 437 (*changes)[player_it->first] = player->GetBoundaryRectangle(); | 435 (*changes)[player_it->first] = player->GetBoundaryRectangle(); |
| 438 } | 436 } |
| 439 } | 437 } |
| 440 } | 438 } |
| 441 #endif // defined(VIDEO_HOLE) | 439 #endif // defined(VIDEO_HOLE) |
| 442 | 440 |
| 443 } // namespace content | 441 } // namespace content |
| OLD | NEW |