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 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 void BrowserMediaPlayerManager::OnInitializeCdm(int cdm_id, | 582 void BrowserMediaPlayerManager::OnInitializeCdm(int cdm_id, |
583 const std::string& key_system, | 583 const std::string& key_system, |
584 const GURL& security_origin) { | 584 const GURL& security_origin) { |
585 if (key_system.size() > kMaxKeySystemLength) { | 585 if (key_system.size() > kMaxKeySystemLength) { |
586 // This failure will be discovered and reported by OnCreateSession() | 586 // This failure will be discovered and reported by OnCreateSession() |
587 // as GetDrmBridge() will return null. | 587 // as GetDrmBridge() will return null. |
588 NOTREACHED() << "Invalid key system: " << key_system; | 588 NOTREACHED() << "Invalid key system: " << key_system; |
589 return; | 589 return; |
590 } | 590 } |
591 | 591 |
592 if (!MediaDrmBridge::IsKeySystemSupportedWithType(key_system, "")) { | 592 if (!MediaDrmBridge::IsKeySystemSupported(key_system)) { |
593 NOTREACHED() << "Unsupported key system: " << key_system; | 593 NOTREACHED() << "Unsupported key system: " << key_system; |
594 return; | 594 return; |
595 } | 595 } |
596 | 596 |
597 AddDrmBridge(cdm_id, key_system, security_origin); | 597 AddDrmBridge(cdm_id, key_system, security_origin); |
598 } | 598 } |
599 | 599 |
600 void BrowserMediaPlayerManager::OnCreateSession( | 600 void BrowserMediaPlayerManager::OnCreateSession( |
601 int cdm_id, | 601 int cdm_id, |
602 uint32 session_id, | 602 uint32 session_id, |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
874 if (player && player->IsSurfaceInUse()) | 874 if (player && player->IsSurfaceInUse()) |
875 return; | 875 return; |
876 ExternalVideoSurfaceContainer* surface_container = | 876 ExternalVideoSurfaceContainer* surface_container = |
877 ExternalVideoSurfaceContainer::FromWebContents(web_contents_); | 877 ExternalVideoSurfaceContainer::FromWebContents(web_contents_); |
878 if (surface_container) | 878 if (surface_container) |
879 surface_container->ReleaseExternalVideoSurface(player_id); | 879 surface_container->ReleaseExternalVideoSurface(player_id); |
880 #endif // defined(VIDEO_HOLE) | 880 #endif // defined(VIDEO_HOLE) |
881 } | 881 } |
882 | 882 |
883 } // namespace content | 883 } // namespace content |
OLD | NEW |