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

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

Issue 193523002: Encrypted Media: Implement IPC based SetCdm(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase only Created 6 years, 9 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
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..b0443a0b8bb1504117f65eaf30442bf303054190 100644
--- a/content/renderer/media/cdm_session_adapter.h
+++ b/content/renderer/media/cdm_session_adapter.h
@@ -65,6 +65,12 @@ class CdmSessionAdapter : public base::RefCounted<CdmSessionAdapter> {
// after WebContentDecryptionModule is freed. http://crbug.com/330324
media::Decryptor* GetDecryptor();
+#if defined(OS_ANDROID)
+ // Returns the CDM ID associated with the |media_keys_|. May be kInvalidCdmId
+ // if no CDM ID is associated.
+ int GetCdmId() const;
+#endif
+
private:
friend class base::RefCounted<CdmSessionAdapter>;
typedef std::map<uint32, WebContentDecryptionModuleSessionImpl*> SessionMap;
@@ -85,12 +91,16 @@ 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_;
+#if defined(OS_ANDROID)
+ int cdm_id_;
+#endif
// NOTE: Weak pointers must be invalidated before all other member variables.
base::WeakPtrFactory<CdmSessionAdapter> weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698