Index: content/renderer/media/crypto/render_cdm_factory.h |
diff --git a/content/renderer/media/crypto/content_decryption_module_factory.h b/content/renderer/media/crypto/render_cdm_factory.h |
similarity index 58% |
rename from content/renderer/media/crypto/content_decryption_module_factory.h |
rename to content/renderer/media/crypto/render_cdm_factory.h |
index be91112a902456418bab9c677a7e7e1bd0963c36..d8a26840cdc44be7a505c94fdbb11ee2f8e73337 100644 |
--- a/content/renderer/media/crypto/content_decryption_module_factory.h |
+++ b/content/renderer/media/crypto/render_cdm_factory.h |
@@ -2,12 +2,13 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CONTENT_RENDERER_MEDIA_CRYPTO_CONTENT_DECRYPTION_MODULE_FACTORY_H_ |
-#define CONTENT_RENDERER_MEDIA_CRYPTO_CONTENT_DECRYPTION_MODULE_FACTORY_H_ |
+#ifndef CONTENT_RENDERER_MEDIA_CRYPTO_RENDER_CDM_FACTORY_H_ |
+#define CONTENT_RENDERER_MEDIA_CRYPTO_RENDER_CDM_FACTORY_H_ |
#include <string> |
#include "base/memory/scoped_ptr.h" |
+#include "media/base/cdm_factory.h" |
#include "media/base/media_keys.h" |
#if defined(ENABLE_PEPPER_CDMS) |
@@ -22,27 +23,44 @@ namespace content { |
class RendererCdmManager; |
#endif |
-class ContentDecryptionModuleFactory { |
+class RenderCdmFactory : public media::CdmFactory { |
public: |
+#if defined(ENABLE_PEPPER_CDMS) |
+ explicit RenderCdmFactory(const CreatePepperCdmCB& create_pepper_cdm_cb); |
+#elif defined(ENABLE_BROWSER_CDMS) |
+ explicit RenderCdmFactory(RendererCdmManager* manager); |
+#else |
+ RenderCdmFactory(); |
+#endif // defined(ENABLE_PEPPER_CDMS) |
+ |
+ virtual ~RenderCdmFactory(); |
+ |
// |create_pepper_cdm_cb| will be called synchronously if necessary. The other |
ddorwin
2014/10/16 17:32:52
Does not apply to this function.
xhwang
2014/10/16 20:08:40
Done.
|
// callbacks can be called asynchronously. |
- static scoped_ptr<media::MediaKeys> Create( |
+ virtual scoped_ptr<media::MediaKeys> Create( |
const std::string& key_system, |
const GURL& security_origin, |
-#if defined(ENABLE_PEPPER_CDMS) |
- const CreatePepperCdmCB& create_pepper_cdm_cb, |
-#elif defined(ENABLE_BROWSER_CDMS) |
- RendererCdmManager* manager, |
- int* cdm_id, // Output parameter indicating the CDM ID of the MediaKeys. |
-#endif // defined(ENABLE_PEPPER_CDMS) |
+#if defined(ENABLE_BROWSER_CDMS) |
+ int* cdm_id, |
+#endif |
const media::SessionMessageCB& session_message_cb, |
const media::SessionReadyCB& session_ready_cb, |
const media::SessionClosedCB& session_closed_cb, |
const media::SessionErrorCB& session_error_cb, |
const media::SessionKeysChangeCB& session_keys_change_cb, |
- const media::SessionExpirationUpdateCB& session_expiration_update_cb); |
+ const media::SessionExpirationUpdateCB& session_expiration_update_cb) |
+ override; |
+ |
+ private: |
+#if defined(ENABLE_PEPPER_CDMS) |
+ CreatePepperCdmCB create_pepper_cdm_cb_; |
+#elif defined(ENABLE_BROWSER_CDMS) |
+ RendererCdmManager* manager_; |
+#endif |
+ |
+ DISALLOW_COPY_AND_ASSIGN(RenderCdmFactory); |
}; |
} // namespace content |
-#endif // CONTENT_RENDERER_MEDIA_CRYPTO_CONTENT_DECRYPTION_MODULE_FACTORY_H_ |
+#endif // CONTENT_RENDERER_MEDIA_CRYPTO_RENDER_CDM_FACTORY_H_ |