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 WebKit::WebMediaPlayerClient* web_media_player_client,
33 WebKit::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::KeyAddedCB& key_added_cb,
41 const media::KeyErrorCB& key_error_cb,
42 const media::KeyMessageCB& key_message_cb);
44 #if defined(ENABLE_PEPPER_CDMS)
45 static void DestroyHelperPlugin(
46 WebKit::WebMediaPlayerClient* web_media_player_client,
47 WebKit::WebFrame* web_frame);
48 #endif // defined(ENABLE_PEPPER_CDMS)
51 } // namespace content
53 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_CONTENT_DECRYPTION_MODULE_FACTORY_H_