| 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/browser/media/android/browser_media_player_manager.h" | 5 #include "content/browser/media/android/browser_media_player_manager.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "content/browser/android/content_view_core_impl.h" | 8 #include "content/browser/android/content_view_core_impl.h" |
| 9 #include "content/browser/media/android/browser_demuxer_android.h" | 9 #include "content/browser/media/android/browser_demuxer_android.h" |
| 10 #include "content/browser/media/android/media_resource_getter_impl.h" | 10 #include "content/browser/media/android/media_resource_getter_impl.h" |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 } | 434 } |
| 435 | 435 |
| 436 void BrowserMediaPlayerManager::OnSessionClosed(int cdm_id, uint32 session_id) { | 436 void BrowserMediaPlayerManager::OnSessionClosed(int cdm_id, uint32 session_id) { |
| 437 Send(new CdmMsg_SessionClosed(routing_id(), cdm_id, session_id)); | 437 Send(new CdmMsg_SessionClosed(routing_id(), cdm_id, session_id)); |
| 438 } | 438 } |
| 439 | 439 |
| 440 void BrowserMediaPlayerManager::OnSessionError( | 440 void BrowserMediaPlayerManager::OnSessionError( |
| 441 int cdm_id, | 441 int cdm_id, |
| 442 uint32 session_id, | 442 uint32 session_id, |
| 443 media::MediaKeys::KeyError error_code, | 443 media::MediaKeys::KeyError error_code, |
| 444 int system_code) { | 444 uint32 system_code) { |
| 445 Send(new CdmMsg_SessionError( | 445 Send(new CdmMsg_SessionError( |
| 446 routing_id(), cdm_id, session_id, error_code, system_code)); | 446 routing_id(), cdm_id, session_id, error_code, system_code)); |
| 447 } | 447 } |
| 448 | 448 |
| 449 #if defined(VIDEO_HOLE) | 449 #if defined(VIDEO_HOLE) |
| 450 void BrowserMediaPlayerManager::AttachExternalVideoSurface(int player_id, | 450 void BrowserMediaPlayerManager::AttachExternalVideoSurface(int player_id, |
| 451 jobject surface) { | 451 jobject surface) { |
| 452 MediaPlayerAndroid* player = GetPlayer(player_id); | 452 MediaPlayerAndroid* player = GetPlayer(player_id); |
| 453 if (player) { | 453 if (player) { |
| 454 player->SetVideoSurface( | 454 player->SetVideoSurface( |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 867 if (player->IsPlaying()) | 867 if (player->IsPlaying()) |
| 868 OnProtectedSurfaceRequested(cdm_id); | 868 OnProtectedSurfaceRequested(cdm_id); |
| 869 } | 869 } |
| 870 | 870 |
| 871 void BrowserMediaPlayerManager::ReleaseFullscreenPlayer( | 871 void BrowserMediaPlayerManager::ReleaseFullscreenPlayer( |
| 872 MediaPlayerAndroid* player) { | 872 MediaPlayerAndroid* player) { |
| 873 player->Release(); | 873 player->Release(); |
| 874 } | 874 } |
| 875 | 875 |
| 876 } // namespace content | 876 } // namespace content |
| OLD | NEW |