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
{
15 class CastBrowserCdmFactory
: public ::media::BrowserCdmFactory
{
17 CastBrowserCdmFactory() {}
18 ~CastBrowserCdmFactory() override
{};
20 // ::media::BrowserCdmFactory implementation:
21 scoped_ptr
< ::media::BrowserCdm
> CreateBrowserCdm(
22 const std::string
& key_system
,
23 const ::media::SessionMessageCB
& session_message_cb
,
24 const ::media::SessionClosedCB
& session_closed_cb
,
25 const ::media::SessionErrorCB
& session_error_cb
,
26 const ::media::SessionKeysChangeCB
& session_keys_change_cb
,
27 const ::media::SessionExpirationUpdateCB
&
28 session_expiration_update_cb
) override
;
31 DISALLOW_COPY_AND_ASSIGN(CastBrowserCdmFactory
);
34 // Allow platform-specific CDMs to be provided.
35 scoped_ptr
< ::media::BrowserCdm
> CreatePlatformBrowserCdm(
36 const CastKeySystem
& key_system
,
37 const ::media::SessionMessageCB
& session_message_cb
,
38 const ::media::SessionClosedCB
& session_closed_cb
,
39 const ::media::SessionErrorCB
& session_error_cb
,
40 const ::media::SessionKeysChangeCB
& session_keys_change_cb
,
41 const ::media::SessionExpirationUpdateCB
& session_expiration_update_cb
);
44 } // namespace chromecast
46 #endif // CHROMECAST_BROWSER_MEDIA_CAST_BROWSER_CDM_FACTORY_H_