- add sources.
[platform/framework/web/crosswalk.git] / src / content / renderer / media / crypto / content_decryption_module_factory.h
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.
4
5 #ifndef CONTENT_RENDERER_MEDIA_CRYPTO_CONTENT_DECRYPTION_MODULE_FACTORY_H_
6 #define CONTENT_RENDERER_MEDIA_CRYPTO_CONTENT_DECRYPTION_MODULE_FACTORY_H_
7
8 #include <string>
9
10 #include "base/memory/scoped_ptr.h"
11 #include "media/base/media_keys.h"
12
13 class GURL;
14
15 #if defined(ENABLE_PEPPER_CDMS)
16 namespace WebKit {
17 class WebFrame;
18 class WebMediaPlayerClient;
19 }
20 #endif  // defined(ENABLE_PEPPER_CDMS)
21
22 namespace content {
23
24 class RendererMediaPlayerManager;
25
26 class ContentDecryptionModuleFactory {
27  public:
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,
37       int media_keys_id,
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);
43
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)
49 };
50
51 }  // namespace content
52
53 #endif  // CONTENT_RENDERER_MEDIA_CRYPTO_CONTENT_DECRYPTION_MODULE_FACTORY_H_