| 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 55%
|
| rename from content/renderer/media/crypto/content_decryption_module_factory.h
|
| rename to content/renderer/media/crypto/render_cdm_factory.h
|
| index be91112a902456418bab9c677a7e7e1bd0963c36..4be2acfd8a5acda9f8c2277afec8b78705b87129 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,42 @@ namespace content {
|
| class RendererCdmManager;
|
| #endif
|
|
|
| -class ContentDecryptionModuleFactory {
|
| +class RenderCdmFactory : public media::CdmFactory {
|
| public:
|
| - // |create_pepper_cdm_cb| will be called synchronously if necessary. The other
|
| - // callbacks can be called asynchronously.
|
| - static 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,
|
| + explicit RenderCdmFactory(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.
|
| + explicit RenderCdmFactory(RendererCdmManager* manager);
|
| +#else
|
| + RenderCdmFactory();
|
| #endif // defined(ENABLE_PEPPER_CDMS)
|
| +
|
| + virtual ~RenderCdmFactory();
|
| +
|
| + virtual scoped_ptr<media::MediaKeys> Create(
|
| + const std::string& key_system,
|
| + const GURL& security_origin,
|
| +#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)
|
| + const override;
|
| +
|
| + private:
|
| +#if defined(ENABLE_PEPPER_CDMS)
|
| + const CreatePepperCdmCB create_pepper_cdm_cb_;
|
| +#elif defined(ENABLE_BROWSER_CDMS)
|
| + const 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_
|
|
|