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

Unified Diff: media/base/media_keys.h

Issue 748473002: Introduce CdmContext interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@set_cdm
Patch Set: Created 6 years, 1 month 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: media/base/media_keys.h
diff --git a/media/base/media_keys.h b/media/base/media_keys.h
index 022f6bcce29078d5ab3142dc0eaa9074b900906a..0f42a1420104d093733f9bfbfd203c306fa7825e 100644
--- a/media/base/media_keys.h
+++ b/media/base/media_keys.h
@@ -11,6 +11,7 @@
#include "base/basictypes.h"
#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
+#include "media/base/cdm_context.h"
#include "media/base/media_export.h"
#include "url/gurl.h"
@@ -34,7 +35,7 @@ typedef CdmPromiseTemplate<KeyIdsVector> KeyIdsPromise;
//
// All key operations are called on the renderer thread. Therefore, these calls
// should be fast and nonblocking; key events should be fired asynchronously.
-class MEDIA_EXPORT MediaKeys {
+class MEDIA_EXPORT MediaKeys : public CdmContext{
ddorwin 2014/11/20 21:31:46 Should the CDM be a Context or provide a context?
xhwang 2014/11/21 01:34:26 Yes, I also debated on that one. I think it makes
public:
// Reported to UMA, so never reuse a value!
// Must be kept in sync with blink::WebMediaPlayerClient::MediaKeyErrorCode
@@ -72,12 +73,9 @@ class MEDIA_EXPORT MediaKeys {
};
static const uint32 kInvalidSessionId = 0;
-#if defined(ENABLE_BROWSER_CDMS)
- static const int kInvalidCdmId = 0;
-#endif
MediaKeys();
ddorwin 2014/11/20 21:31:46 ditto
xhwang 2014/11/21 01:34:26 Done.
- virtual ~MediaKeys();
+ ~MediaKeys() override;
// Provides a server certificate to be used to encrypt messages to the
// license server.
@@ -121,16 +119,8 @@ class MEDIA_EXPORT MediaKeys {
virtual void GetUsableKeyIds(const std::string& web_session_id,
scoped_ptr<KeyIdsPromise> promise) = 0;
- // Gets the Decryptor object associated with the MediaKeys. Returns NULL if
- // no Decryptor object is associated. The returned object is only guaranteed
- // to be valid during the MediaKeys' lifetime.
- virtual Decryptor* GetDecryptor();
-
-#if defined(ENABLE_BROWSER_CDMS)
- // Returns the CDM ID associated with |this|. May be kInvalidCdmId if no CDM
- // ID is associated.
- virtual int GetCdmId() const = 0;
-#endif
+ // CdmContext implementation
ddorwin 2014/11/20 21:31:47 nit: period.
xhwang 2014/11/21 01:34:26 Done.
+ Decryptor* GetDecryptor() override;
ddorwin 2014/11/20 21:31:46 I may have asked this before, but why isn't this j
xhwang 2014/11/21 01:34:26 Done, so that we won't discuss this again in the f
private:
DISALLOW_COPY_AND_ASSIGN(MediaKeys);
« media/base/cdm_context.h ('K') | « media/base/cdm_context.cc ('k') | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698