| 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/cdm_messages.h" | 9 #include "content/common/media/cdm_messages.h" |
| 10 #include "content/common/media/media_player_messages_android.h" | 10 #include "content/common/media/media_player_messages_android.h" |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 uint32 session_id) { | 311 uint32 session_id) { |
| 312 ProxyMediaKeys* media_keys = GetMediaKeys(cdm_id); | 312 ProxyMediaKeys* media_keys = GetMediaKeys(cdm_id); |
| 313 if (media_keys) | 313 if (media_keys) |
| 314 media_keys->OnSessionClosed(session_id); | 314 media_keys->OnSessionClosed(session_id); |
| 315 } | 315 } |
| 316 | 316 |
| 317 void RendererMediaPlayerManager::OnSessionError( | 317 void RendererMediaPlayerManager::OnSessionError( |
| 318 int cdm_id, | 318 int cdm_id, |
| 319 uint32 session_id, | 319 uint32 session_id, |
| 320 media::MediaKeys::KeyError error_code, | 320 media::MediaKeys::KeyError error_code, |
| 321 int system_code) { | 321 uint32 system_code) { |
| 322 ProxyMediaKeys* media_keys = GetMediaKeys(cdm_id); | 322 ProxyMediaKeys* media_keys = GetMediaKeys(cdm_id); |
| 323 if (media_keys) | 323 if (media_keys) |
| 324 media_keys->OnSessionError(session_id, error_code, system_code); | 324 media_keys->OnSessionError(session_id, error_code, system_code); |
| 325 } | 325 } |
| 326 | 326 |
| 327 int RendererMediaPlayerManager::RegisterMediaPlayer( | 327 int RendererMediaPlayerManager::RegisterMediaPlayer( |
| 328 WebMediaPlayerAndroid* player) { | 328 WebMediaPlayerAndroid* player) { |
| 329 media_players_[next_media_player_id_] = player; | 329 media_players_[next_media_player_id_] = player; |
| 330 return next_media_player_id_++; | 330 return next_media_player_id_++; |
| 331 } | 331 } |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 | 426 |
| 427 if (player && player->hasVideo()) { | 427 if (player && player->hasVideo()) { |
| 428 if (player->UpdateBoundaryRectangle()) | 428 if (player->UpdateBoundaryRectangle()) |
| 429 (*changes)[player_it->first] = player->GetBoundaryRectangle(); | 429 (*changes)[player_it->first] = player->GetBoundaryRectangle(); |
| 430 } | 430 } |
| 431 } | 431 } |
| 432 } | 432 } |
| 433 #endif // defined(VIDEO_HOLE) | 433 #endif // defined(VIDEO_HOLE) |
| 434 | 434 |
| 435 } // namespace content | 435 } // namespace content |
| OLD | NEW |