OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_RENDERER_MEDIA_CRYPTO_CONTENT_DECRYPTION_MODULE_FACTORY_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_CRYPTO_CONTENT_DECRYPTION_MODULE_FACTORY_H_ |
6 #define CONTENT_RENDERER_MEDIA_CRYPTO_CONTENT_DECRYPTION_MODULE_FACTORY_H_ | 6 #define CONTENT_RENDERER_MEDIA_CRYPTO_CONTENT_DECRYPTION_MODULE_FACTORY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "media/base/media_keys.h" | 11 #include "media/base/media_keys.h" |
12 | 12 |
13 #if defined(ENABLE_PEPPER_CDMS) | 13 #if defined(ENABLE_PEPPER_CDMS) |
14 #include "content/renderer/media/crypto/pepper_cdm_wrapper.h" | 14 #include "content/renderer/media/crypto/pepper_cdm_wrapper.h" |
15 #endif | 15 #endif |
16 | 16 |
17 class GURL; | 17 class GURL; |
18 | 18 |
19 namespace content { | 19 namespace content { |
20 | 20 |
| 21 #if defined(ENABLE_BROWSER_CDMS) |
21 class RendererCdmManager; | 22 class RendererCdmManager; |
| 23 #endif |
22 | 24 |
23 class ContentDecryptionModuleFactory { | 25 class ContentDecryptionModuleFactory { |
24 public: | 26 public: |
25 // |create_pepper_cdm_cb| will be called synchronously if necessary. The other | 27 // |create_pepper_cdm_cb| will be called synchronously if necessary. The other |
26 // callbacks can be called asynchronously. | 28 // callbacks can be called asynchronously. |
27 static scoped_ptr<media::MediaKeys> Create( | 29 static scoped_ptr<media::MediaKeys> Create( |
28 const std::string& key_system, | 30 const std::string& key_system, |
29 const GURL& security_origin, | 31 const GURL& security_origin, |
30 #if defined(ENABLE_PEPPER_CDMS) | 32 #if defined(ENABLE_PEPPER_CDMS) |
31 const CreatePepperCdmCB& create_pepper_cdm_cb, | 33 const CreatePepperCdmCB& create_pepper_cdm_cb, |
32 #elif defined(OS_ANDROID) | 34 #elif defined(ENABLE_BROWSER_CDMS) |
33 RendererCdmManager* manager, | 35 RendererCdmManager* manager, |
34 int* cdm_id, // Output parameter indicating the CDM ID of the MediaKeys. | 36 int* cdm_id, // Output parameter indicating the CDM ID of the MediaKeys. |
35 #endif // defined(ENABLE_PEPPER_CDMS) | 37 #endif // defined(ENABLE_PEPPER_CDMS) |
36 const media::SessionMessageCB& session_message_cb, | 38 const media::SessionMessageCB& session_message_cb, |
37 const media::SessionReadyCB& session_ready_cb, | 39 const media::SessionReadyCB& session_ready_cb, |
38 const media::SessionClosedCB& session_closed_cb, | 40 const media::SessionClosedCB& session_closed_cb, |
39 const media::SessionErrorCB& session_error_cb); | 41 const media::SessionErrorCB& session_error_cb); |
40 }; | 42 }; |
41 | 43 |
42 } // namespace content | 44 } // namespace content |
43 | 45 |
44 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_CONTENT_DECRYPTION_MODULE_FACTORY_H_ | 46 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_CONTENT_DECRYPTION_MODULE_FACTORY_H_ |
OLD | NEW |