diff options
Diffstat (limited to 'content/renderer/media/crypto/render_cdm_factory.h')
-rw-r--r-- | content/renderer/media/crypto/render_cdm_factory.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/content/renderer/media/crypto/render_cdm_factory.h b/content/renderer/media/crypto/render_cdm_factory.h index 50e1422..f15bfe8 100644 --- a/content/renderer/media/crypto/render_cdm_factory.h +++ b/content/renderer/media/crypto/render_cdm_factory.h @@ -8,6 +8,8 @@ #include <string> #include "base/memory/scoped_ptr.h" +#include "base/threading/thread_checker.h" +#include "content/public/renderer/render_frame_observer.h" #include "media/base/cdm_factory.h" #include "media/base/media_keys.h" @@ -23,15 +25,17 @@ namespace content { class RendererCdmManager; #endif -class RenderCdmFactory : public media::CdmFactory { +// CdmFactory implementation in content/renderer. This class is not thread safe +// and should only be used on one thread. +class RenderCdmFactory : public media::CdmFactory, public RenderFrameObserver { public: + RenderCdmFactory( #if defined(ENABLE_PEPPER_CDMS) - explicit RenderCdmFactory(const CreatePepperCdmCB& create_pepper_cdm_cb); + const CreatePepperCdmCB& create_pepper_cdm_cb, #elif defined(ENABLE_BROWSER_CDMS) - explicit RenderCdmFactory(RendererCdmManager* manager); -#else - RenderCdmFactory(); + RendererCdmManager* manager, #endif // defined(ENABLE_PEPPER_CDMS) + RenderFrame* render_frame); ~RenderCdmFactory() override; @@ -55,6 +59,8 @@ class RenderCdmFactory : public media::CdmFactory { RendererCdmManager* manager_; #endif + base::ThreadChecker thread_checker_; + DISALLOW_COPY_AND_ASSIGN(RenderCdmFactory); }; |