| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 media_player_params.player_id, | 70 media_player_params.player_id, |
| 71 media_player_params.url, | 71 media_player_params.url, |
| 72 media_player_params.first_party_for_cookies, | 72 media_player_params.first_party_for_cookies, |
| 73 user_agent, | 73 user_agent, |
| 74 hide_url_log, | 74 hide_url_log, |
| 75 manager, | 75 manager, |
| 76 base::Bind(&BrowserMediaPlayerManager::OnMediaResourcesRequested, | 76 base::Bind(&BrowserMediaPlayerManager::OnMediaResourcesRequested, |
| 77 weak_ptr_factory_.GetWeakPtr()), | 77 weak_ptr_factory_.GetWeakPtr()), |
| 78 base::Bind(&BrowserMediaPlayerManager::OnMediaResourcesReleased, | 78 base::Bind(&BrowserMediaPlayerManager::OnMediaResourcesReleased, |
| 79 weak_ptr_factory_.GetWeakPtr()), | 79 weak_ptr_factory_.GetWeakPtr()), |
| 80 media_player_params.frame_url); | 80 media_player_params.frame_url, |
| 81 media_player_params.has_single_security_origin, |
| 82 media_player_params.allow_credentials); |
| 81 BrowserMediaPlayerManager* browser_media_player_manager = | 83 BrowserMediaPlayerManager* browser_media_player_manager = |
| 82 static_cast<BrowserMediaPlayerManager*>(manager); | 84 static_cast<BrowserMediaPlayerManager*>(manager); |
| 83 ContentViewCoreImpl* content_view_core_impl = | 85 ContentViewCoreImpl* content_view_core_impl = |
| 84 static_cast<ContentViewCoreImpl*>(ContentViewCore::FromWebContents( | 86 static_cast<ContentViewCoreImpl*>(ContentViewCore::FromWebContents( |
| 85 browser_media_player_manager->web_contents_)); | 87 browser_media_player_manager->web_contents_)); |
| 86 if (!content_view_core_impl) { | 88 if (!content_view_core_impl) { |
| 87 // May reach here due to prerendering. Don't extract the metadata | 89 // May reach here due to prerendering. Don't extract the metadata |
| 88 // since it is expensive. | 90 // since it is expensive. |
| 89 // TODO(qinmin): extract the metadata once the user decided to load | 91 // TODO(qinmin): extract the metadata once the user decided to load |
| 90 // the page. | 92 // the page. |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 #if defined(VIDEO_HOLE) | 574 #if defined(VIDEO_HOLE) |
| 573 MediaPlayerAndroid* player = GetPlayer(player_id); | 575 MediaPlayerAndroid* player = GetPlayer(player_id); |
| 574 if (player && player->IsSurfaceInUse()) | 576 if (player && player->IsSurfaceInUse()) |
| 575 return; | 577 return; |
| 576 if (external_video_surface_container_) | 578 if (external_video_surface_container_) |
| 577 external_video_surface_container_->ReleaseExternalVideoSurface(player_id); | 579 external_video_surface_container_->ReleaseExternalVideoSurface(player_id); |
| 578 #endif // defined(VIDEO_HOLE) | 580 #endif // defined(VIDEO_HOLE) |
| 579 } | 581 } |
| 580 | 582 |
| 581 } // namespace content | 583 } // namespace content |
| OLD | NEW |