Unregister from GCM when the only GCM app is removed
[chromium-blink-merge.git] / media / cdm / default_cdm_factory.cc
blob985bdef77f4a59796e64fea397073a592f0c5fd8
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 const GURL& security_origin,
21 const SessionMessageCB& session_message_cb,
22 const SessionClosedCB& session_closed_cb,
23 const SessionErrorCB& session_error_cb,
24 const SessionKeysChangeCB& session_keys_change_cb,
25 const SessionExpirationUpdateCB& session_expiration_update_cb) {
26 if (CanUseAesDecryptor(key_system)) {
27 return make_scoped_ptr(new AesDecryptor(
28 session_message_cb, session_closed_cb, session_keys_change_cb));
31 return nullptr;
34 } // namespace media