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

Unified Diff: media/base/cdm_context.h

Issue 835683002: media: Always define |cdm_id| in CdmContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 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
« no previous file with comments | « content/renderer/media/crypto/proxy_media_keys.cc ('k') | media/cdm/aes_decryptor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/cdm_context.h
diff --git a/media/base/cdm_context.h b/media/base/cdm_context.h
index 2a3e8cd25ded665e6daf630152924b1f2b8a7d4d..b3e6a0b0ea0b270b9e436da9f5f22a2264ad5fd8 100644
--- a/media/base/cdm_context.h
+++ b/media/base/cdm_context.h
@@ -17,22 +17,22 @@ class Decryptor;
// content decryption module (CDM) to decrypt (and decode) encrypted buffers.
class MEDIA_EXPORT CdmContext {
public:
-#if defined(ENABLE_BROWSER_CDMS)
+ // Indicates an invalid CDM ID. See GetCdmId() for details.
static const int kInvalidCdmId = 0;
-#endif
virtual ~CdmContext();
- // Gets the Decryptor object associated with the CDM. Returns NULL if no
- // Decryptor object is associated. The returned object is only guaranteed
- // to be valid during the CDM's lifetime.
+ // Gets the Decryptor object associated with the CDM. Returns NULL if the CDM
+ // does not support a Decryptor. The returned object is only guaranteed to be
+ // valid during the CDM's lifetime.
virtual Decryptor* GetDecryptor() = 0;
-#if defined(ENABLE_BROWSER_CDMS)
- // Returns the CDM ID associated with |this|. May be kInvalidCdmId if no CDM
- // ID is associated.
+ // Returns a unique ID associated with the CDM, which can be used by the
ddorwin 2015/03/19 17:24:12 This line could be interpreted as a DI. Please rep
xhwang 2015/03/19 18:25:33 Done.
+ // recipient of this CdmContext to locate the real CDM. This is useful when
+ // the CDM is hosted remotely, e.g. in a different process.
+ // Returns kInvalidCdmId if the CDM does not support an ID, e.g. the CDM only
+ // supports a Decryptor interface.
virtual int GetCdmId() const = 0;
-#endif
protected:
CdmContext();
« no previous file with comments | « content/renderer/media/crypto/proxy_media_keys.cc ('k') | media/cdm/aes_decryptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698