cdm_context_ref_impl.h 1000 B

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright 2018 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef MEDIA_CDM_CDM_CONTEXT_REF_IMPL_H_
  5. #define MEDIA_CDM_CDM_CONTEXT_REF_IMPL_H_
  6. #include "base/memory/ref_counted.h"
  7. #include "base/threading/thread_checker.h"
  8. #include "media/base/cdm_context.h"
  9. #include "media/base/media_export.h"
  10. namespace media {
  11. class ContentDecryptionModule;
  12. class MEDIA_EXPORT CdmContextRefImpl final : public CdmContextRef {
  13. public:
  14. explicit CdmContextRefImpl(scoped_refptr<ContentDecryptionModule> cdm);
  15. CdmContextRefImpl(const CdmContextRefImpl&) = delete;
  16. CdmContextRefImpl& operator=(const CdmContextRefImpl&) = delete;
  17. ~CdmContextRefImpl() final;
  18. // CdmContextRef implementation.
  19. CdmContext* GetCdmContext() final;
  20. private:
  21. scoped_refptr<ContentDecryptionModule> cdm_;
  22. THREAD_CHECKER(thread_checker_);
  23. };
  24. } // namespace media
  25. #endif // MEDIA_CDM_CDM_CONTEXT_REF_IMPL_H_