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 "chromecast/browser/media/cast_browser_cdm_factory.h"
10 scoped_ptr
< ::media::BrowserCdm
> CastBrowserCdmFactory::CreateBrowserCdm(
11 const std::string
& key_system_name
,
12 const ::media::SessionMessageCB
& session_message_cb
,
13 const ::media::SessionClosedCB
& session_closed_cb
,
14 const ::media::SessionErrorCB
& session_error_cb
,
15 const ::media::SessionKeysChangeCB
& session_keys_change_cb
,
16 const ::media::SessionExpirationUpdateCB
& session_expiration_update_cb
) {
17 CastKeySystem
key_system(GetKeySystemByName(key_system_name
));
19 // TODO(gunsch): handle ClearKey decryption. See crbug.com/441957
21 scoped_ptr
< ::media::BrowserCdm
> platform_cdm(
22 CreatePlatformBrowserCdm(key_system
,
26 session_keys_change_cb
,
27 session_expiration_update_cb
));
29 return platform_cdm
.Pass();
32 LOG(INFO
) << "No matching key system found.";
33 return scoped_ptr
< ::media::BrowserCdm
>();
37 } // namespace chromecast