1 // Copyright 2013 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 CONTENT_RENDERER_MEDIA_CRYPTO_CONTENT_DECRYPTION_MODULE_FACTORY_H_
6 #define CONTENT_RENDERER_MEDIA_CRYPTO_CONTENT_DECRYPTION_MODULE_FACTORY_H_
10 #include "base/memory/scoped_ptr.h"
11 #include "media/base/media_keys.h"
15 #if defined(ENABLE_PEPPER_CDMS)
18 class WebMediaPlayerClient
;
20 #endif // defined(ENABLE_PEPPER_CDMS)
24 class RendererMediaPlayerManager
;
26 class ContentDecryptionModuleFactory
{
28 static scoped_ptr
<media::MediaKeys
> Create(
29 const std::string
& key_system
,
30 #if defined(ENABLE_PEPPER_CDMS)
31 // TODO(ddorwin): We need different pointers for the WD API.
32 blink::WebMediaPlayerClient
* web_media_player_client
,
33 blink::WebFrame
* web_frame
,
34 const base::Closure
& destroy_plugin_cb
,
35 #elif defined(OS_ANDROID)
36 RendererMediaPlayerManager
* manager
,
38 const GURL
& frame_url
,
39 #endif // defined(ENABLE_PEPPER_CDMS)
40 const media::SessionCreatedCB
& session_created_cb
,
41 const media::SessionMessageCB
& session_message_cb
,
42 const media::SessionReadyCB
& session_ready_cb
,
43 const media::SessionClosedCB
& session_closed_cb
,
44 const media::SessionErrorCB
& session_error_cb
);
46 #if defined(ENABLE_PEPPER_CDMS)
47 static void DestroyHelperPlugin(
48 blink::WebMediaPlayerClient
* web_media_player_client
,
49 blink::WebFrame
* web_frame
);
50 #endif // defined(ENABLE_PEPPER_CDMS)
53 } // namespace content
55 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_CONTENT_DECRYPTION_MODULE_FACTORY_H_