Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1377)

Unified Diff: content/renderer/media/cdm_session_adapter.cc

Issue 665563002: Add MediaKeys::GetCdmId(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Make GetCdmId() pure virtual. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/media/cdm_session_adapter.h ('k') | content/renderer/media/crypto/proxy_decryptor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/cdm_session_adapter.cc
diff --git a/content/renderer/media/cdm_session_adapter.cc b/content/renderer/media/cdm_session_adapter.cc
index 83da6161d8dd39dc795387b5892150cf7b75bc7b..af88c70a5f84350517c21e387cdbd6e5a50d5044 100644
--- a/content/renderer/media/cdm_session_adapter.cc
+++ b/content/renderer/media/cdm_session_adapter.cc
@@ -15,21 +15,13 @@
#include "media/base/media_keys.h"
#include "url/gurl.h"
-#if defined(ENABLE_BROWSER_CDMS)
-#include "content/renderer/media/crypto/renderer_cdm_manager.h"
-#endif // defined(ENABLE_BROWSER_CDMS)
-
namespace content {
const char kMediaEME[] = "Media.EME.";
const char kDot[] = ".";
-CdmSessionAdapter::CdmSessionAdapter() :
-#if defined(ENABLE_BROWSER_CDMS)
- // TODO(xhwang): Move kInvalidCdmId to src/media.
- cdm_id_(RendererCdmManager::kInvalidCdmId),
-#endif
- weak_ptr_factory_(this) {}
+CdmSessionAdapter::CdmSessionAdapter() : weak_ptr_factory_(this) {
+}
CdmSessionAdapter::~CdmSessionAdapter() {}
@@ -45,9 +37,6 @@ bool CdmSessionAdapter::Initialize(media::CdmFactory* cdm_factory,
media_keys_ = cdm_factory->Create(
key_system,
security_origin,
-#if defined(ENABLE_BROWSER_CDMS)
- &cdm_id_,
-#endif // defined(ENABLE_PEPPER_CDMS)
base::Bind(&CdmSessionAdapter::OnSessionMessage, weak_this),
base::Bind(&CdmSessionAdapter::OnSessionReady, weak_this),
base::Bind(&CdmSessionAdapter::OnSessionClosed, weak_this),
@@ -143,7 +132,7 @@ const std::string& CdmSessionAdapter::GetKeySystemUMAPrefix() const {
#if defined(ENABLE_BROWSER_CDMS)
int CdmSessionAdapter::GetCdmId() const {
- return cdm_id_;
+ return media_keys_->GetCdmId();
}
#endif // defined(ENABLE_BROWSER_CDMS)
« no previous file with comments | « content/renderer/media/cdm_session_adapter.h ('k') | content/renderer/media/crypto/proxy_decryptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698