Index: content/renderer/media/cdm_session_adapter.h |
diff --git a/content/renderer/media/cdm_session_adapter.h b/content/renderer/media/cdm_session_adapter.h |
index 9c8ae0a5ee04b061f7805947d99418f73bdb2bf7..8f445754aae02b69cbf25ec17dae29c6a14bf45e 100644 |
--- a/content/renderer/media/cdm_session_adapter.h |
+++ b/content/renderer/media/cdm_session_adapter.h |
@@ -33,7 +33,9 @@ class CdmSessionAdapter : public base::RefCounted<CdmSessionAdapter> { |
bool Initialize( |
#if defined(ENABLE_PEPPER_CDMS) |
const CreatePepperCdmCB& create_pepper_cdm_cb, |
-#endif |
+#elif defined(OS_ANDROID) |
+ int* cdm_id, |
+#endif // defined(ENABLE_PEPPER_CDMS) |
const std::string& key_system); |
// Creates a new session and adds it to the internal map. The caller owns the |
@@ -65,6 +67,10 @@ class CdmSessionAdapter : public base::RefCounted<CdmSessionAdapter> { |
// after WebContentDecryptionModule is freed. http://crbug.com/330324 |
media::Decryptor* GetDecryptor(); |
+ // Returns the CDM ID associated with the |media_keys_|. May be kInvalidCdmId |
+ // if no CDM ID is associated. |
+ int GetCdmId() const; |
ddorwin
2014/03/25 23:03:59
Remove.
xhwang
2014/03/26 06:02:04
This is used in PS4.
|
+ |
private: |
friend class base::RefCounted<CdmSessionAdapter>; |
typedef std::map<uint32, WebContentDecryptionModuleSessionImpl*> SessionMap; |
@@ -85,14 +91,13 @@ class CdmSessionAdapter : public base::RefCounted<CdmSessionAdapter> { |
// Helper function of the callbacks. |
WebContentDecryptionModuleSessionImpl* GetSession(uint32 session_id); |
+ // Session ID should be unique per renderer process for debugging purposes. |
+ static uint32 next_session_id_; |
+ |
scoped_ptr<media::MediaKeys> media_keys_; |
SessionMap sessions_; |
- // Session ID should be unique per renderer process for debugging purposes. |
- static uint32 next_session_id_; |
- |
- // NOTE: Weak pointers must be invalidated before all other member variables. |
base::WeakPtrFactory<CdmSessionAdapter> weak_ptr_factory_; |
ddorwin
2014/03/25 23:03:59
This comment was lost:
// NOTE: Weak pointers must
xhwang
2014/03/26 06:02:04
Done.
|
DISALLOW_COPY_AND_ASSIGN(CdmSessionAdapter); |