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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 if (fullscreen_player_id_ == player_id) | 284 if (fullscreen_player_id_ == player_id) |
285 video_view_->OnVideoSizeChanged(width, height); | 285 video_view_->OnVideoSizeChanged(width, height); |
286 } | 286 } |
287 | 287 |
288 media::MediaResourceGetter* | 288 media::MediaResourceGetter* |
289 BrowserMediaPlayerManager::GetMediaResourceGetter() { | 289 BrowserMediaPlayerManager::GetMediaResourceGetter() { |
290 if (!media_resource_getter_.get()) { | 290 if (!media_resource_getter_.get()) { |
291 RenderProcessHost* host = web_contents()->GetRenderProcessHost(); | 291 RenderProcessHost* host = web_contents()->GetRenderProcessHost(); |
292 BrowserContext* context = host->GetBrowserContext(); | 292 BrowserContext* context = host->GetBrowserContext(); |
293 StoragePartition* partition = host->GetStoragePartition(); | 293 StoragePartition* partition = host->GetStoragePartition(); |
294 fileapi::FileSystemContext* file_system_context = | 294 storage::FileSystemContext* file_system_context = |
295 partition ? partition->GetFileSystemContext() : NULL; | 295 partition ? partition->GetFileSystemContext() : NULL; |
296 // Eventually this needs to be fixed to pass the correct frame rather | 296 // Eventually this needs to be fixed to pass the correct frame rather |
297 // than just using the main frame. | 297 // than just using the main frame. |
298 media_resource_getter_.reset(new MediaResourceGetterImpl( | 298 media_resource_getter_.reset(new MediaResourceGetterImpl( |
299 context, | 299 context, |
300 file_system_context, | 300 file_system_context, |
301 host->GetID(), | 301 host->GetID(), |
302 web_contents()->GetMainFrame()->GetRoutingID())); | 302 web_contents()->GetMainFrame()->GetRoutingID())); |
303 } | 303 } |
304 return media_resource_getter_.get(); | 304 return media_resource_getter_.get(); |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 #if defined(VIDEO_HOLE) | 586 #if defined(VIDEO_HOLE) |
587 MediaPlayerAndroid* player = GetPlayer(player_id); | 587 MediaPlayerAndroid* player = GetPlayer(player_id); |
588 if (player && player->IsSurfaceInUse()) | 588 if (player && player->IsSurfaceInUse()) |
589 return; | 589 return; |
590 if (external_video_surface_container_) | 590 if (external_video_surface_container_) |
591 external_video_surface_container_->ReleaseExternalVideoSurface(player_id); | 591 external_video_surface_container_->ReleaseExternalVideoSurface(player_id); |
592 #endif // defined(VIDEO_HOLE) | 592 #endif // defined(VIDEO_HOLE) |
593 } | 593 } |
594 | 594 |
595 } // namespace content | 595 } // namespace content |
OLD | NEW |