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/android/scoped_java_ref.h" | 7 #include "base/android/scoped_java_ref.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "content/browser/android/content_view_core_impl.h" | 9 #include "content/browser/android/content_view_core_impl.h" |
10 #include "content/browser/media/android/browser_demuxer_android.h" | 10 #include "content/browser/media/android/browser_demuxer_android.h" |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 if (player_id == fullscreen_player_id_) | 502 if (player_id == fullscreen_player_id_) |
503 fullscreen_player_is_released_ = true; | 503 fullscreen_player_is_released_ = true; |
504 } | 504 } |
505 | 505 |
506 void BrowserMediaPlayerManager::OnDestroyPlayer(int player_id) { | 506 void BrowserMediaPlayerManager::OnDestroyPlayer(int player_id) { |
507 RemovePlayer(player_id); | 507 RemovePlayer(player_id); |
508 if (fullscreen_player_id_ == player_id) | 508 if (fullscreen_player_id_ == player_id) |
509 fullscreen_player_id_ = -1; | 509 fullscreen_player_id_ = -1; |
510 } | 510 } |
511 | 511 |
| 512 void BrowserMediaPlayerManager::OnRequestRemotePlayback(int /* player_id */) { |
| 513 // Does nothing if we don't have a remote player |
| 514 } |
| 515 |
| 516 void BrowserMediaPlayerManager::OnRequestRemotePlaybackControl( |
| 517 int /* player_id */) { |
| 518 // Does nothing if we don't have a remote player |
| 519 } |
| 520 |
512 void BrowserMediaPlayerManager::AddPlayer(MediaPlayerAndroid* player) { | 521 void BrowserMediaPlayerManager::AddPlayer(MediaPlayerAndroid* player) { |
513 DCHECK(!GetPlayer(player->player_id())); | 522 DCHECK(!GetPlayer(player->player_id())); |
514 players_.push_back(player); | 523 players_.push_back(player); |
515 } | 524 } |
516 | 525 |
517 void BrowserMediaPlayerManager::RemovePlayer(int player_id) { | 526 void BrowserMediaPlayerManager::RemovePlayer(int player_id) { |
518 for (ScopedVector<MediaPlayerAndroid>::iterator it = players_.begin(); | 527 for (ScopedVector<MediaPlayerAndroid>::iterator it = players_.begin(); |
519 it != players_.end(); ++it) { | 528 it != players_.end(); ++it) { |
520 MediaPlayerAndroid* player = *it; | 529 MediaPlayerAndroid* player = *it; |
521 if (player->player_id() == player_id) { | 530 if (player->player_id() == player_id) { |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 #if defined(VIDEO_HOLE) | 594 #if defined(VIDEO_HOLE) |
586 MediaPlayerAndroid* player = GetPlayer(player_id); | 595 MediaPlayerAndroid* player = GetPlayer(player_id); |
587 if (player && player->IsSurfaceInUse()) | 596 if (player && player->IsSurfaceInUse()) |
588 return; | 597 return; |
589 if (external_video_surface_container_) | 598 if (external_video_surface_container_) |
590 external_video_surface_container_->ReleaseExternalVideoSurface(player_id); | 599 external_video_surface_container_->ReleaseExternalVideoSurface(player_id); |
591 #endif // defined(VIDEO_HOLE) | 600 #endif // defined(VIDEO_HOLE) |
592 } | 601 } |
593 | 602 |
594 } // namespace content | 603 } // namespace content |
OLD | NEW |