Roll src/third_party/WebKit e0eac24:489c548 (svn 193311:193320)
[chromium-blink-merge.git] / media / cdm / default_cdm_factory.cc
blob9d8ea83edcccb07ad05874bdc082900988be74ac
1 // Copyright 2014 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.
5 #include "media/cdm/default_cdm_factory.h"
7 #include "media/base/key_systems.h"
8 #include "media/cdm/aes_decryptor.h"
10 namespace media {
12 DefaultCdmFactory::DefaultCdmFactory() {
15 DefaultCdmFactory::~DefaultCdmFactory() {
18 scoped_ptr<MediaKeys> DefaultCdmFactory::Create(
19 const std::string& key_system,
20 bool allow_distinctive_identifier,
21 bool allow_persistent_state,
22 const GURL& security_origin,
23 const SessionMessageCB& session_message_cb,
24 const SessionClosedCB& session_closed_cb,
25 const LegacySessionErrorCB& legacy_session_error_cb,
26 const SessionKeysChangeCB& session_keys_change_cb,
27 const SessionExpirationUpdateCB& session_expiration_update_cb) {
28 if (CanUseAesDecryptor(key_system)) {
29 return make_scoped_ptr(new AesDecryptor(
30 session_message_cb, session_closed_cb, session_keys_change_cb));
33 return nullptr;
36 } // namespace media