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 #ifndef CHROMECAST_BROWSER_MEDIA_CAST_BROWSER_CDM_FACTORY_H_
6 #define CHROMECAST_BROWSER_MEDIA_CAST_BROWSER_CDM_FACTORY_H_
8 #include "chromecast/media/base/key_systems_common.h"
9 #include "media/base/browser_cdm.h"
10 #include "media/base/browser_cdm_factory.h"
12 namespace chromecast
{
17 class CastBrowserCdmFactory
: public ::media::BrowserCdmFactory
{
19 CastBrowserCdmFactory() {}
20 ~CastBrowserCdmFactory() override
{};
22 // ::media::BrowserCdmFactory implementation:
23 scoped_ptr
<::media::BrowserCdm
> CreateBrowserCdm(
24 const std::string
& key_system
,
25 bool use_hw_secure_codecs
,
26 const ::media::SessionMessageCB
& session_message_cb
,
27 const ::media::SessionClosedCB
& session_closed_cb
,
28 const ::media::LegacySessionErrorCB
& legacy_session_error_cb
,
29 const ::media::SessionKeysChangeCB
& session_keys_change_cb
,
30 const ::media::SessionExpirationUpdateCB
& session_expiration_update_cb
)
34 DISALLOW_COPY_AND_ASSIGN(CastBrowserCdmFactory
);
37 // Allow platform-specific CDMs to be provided.
38 scoped_ptr
<BrowserCdmCast
> CreatePlatformBrowserCdm(
39 const CastKeySystem
& key_system
);
42 } // namespace chromecast
44 #endif // CHROMECAST_BROWSER_MEDIA_CAST_BROWSER_CDM_FACTORY_H_