summaryrefslogtreecommitdiff
path: root/chromium/media/cdm/cdm_context_ref_impl.cc
blob: bd78438f730d99acf16a7520de68c9a09919d595 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "media/cdm/cdm_context_ref_impl.h"

#include <ostream>

#include "base/check_op.h"
#include "media/base/content_decryption_module.h"

namespace media {

CdmContextRefImpl::CdmContextRefImpl(scoped_refptr<ContentDecryptionModule> cdm)
    : cdm_(std::move(cdm)) {
  DCHECK(cdm_);
}

CdmContextRefImpl::~CdmContextRefImpl() {
  // This will release |cdm_|.
}

CdmContext* CdmContextRefImpl::GetCdmContext() {
  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
  return cdm_->GetCdmContext();
}

}  // namespace media