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_RENDER_CDM_FACTORY_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_CRYPTO_RENDER_CDM_FACTORY_H_ |
6 #define CONTENT_RENDERER_MEDIA_CRYPTO_RENDER_CDM_FACTORY_H_ | 6 #define CONTENT_RENDERER_MEDIA_CRYPTO_RENDER_CDM_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" |
(...skipping 21 matching lines...) Expand all Loading... |
32 RenderCdmFactory( | 32 RenderCdmFactory( |
33 #if defined(ENABLE_PEPPER_CDMS) | 33 #if defined(ENABLE_PEPPER_CDMS) |
34 const CreatePepperCdmCB& create_pepper_cdm_cb, | 34 const CreatePepperCdmCB& create_pepper_cdm_cb, |
35 #elif defined(ENABLE_BROWSER_CDMS) | 35 #elif defined(ENABLE_BROWSER_CDMS) |
36 RendererCdmManager* manager, | 36 RendererCdmManager* manager, |
37 #endif // defined(ENABLE_PEPPER_CDMS) | 37 #endif // defined(ENABLE_PEPPER_CDMS) |
38 RenderFrame* render_frame); | 38 RenderFrame* render_frame); |
39 | 39 |
40 ~RenderCdmFactory() override; | 40 ~RenderCdmFactory() override; |
41 | 41 |
42 scoped_ptr<media::MediaKeys> Create( | 42 // CdmFactory implementation. |
| 43 void Create( |
43 const std::string& key_system, | 44 const std::string& key_system, |
44 bool allow_distinctive_identifier, | 45 bool allow_distinctive_identifier, |
45 bool allow_persistent_state, | 46 bool allow_persistent_state, |
46 const GURL& security_origin, | 47 const GURL& security_origin, |
47 const media::SessionMessageCB& session_message_cb, | 48 const media::SessionMessageCB& session_message_cb, |
48 const media::SessionClosedCB& session_closed_cb, | 49 const media::SessionClosedCB& session_closed_cb, |
49 const media::LegacySessionErrorCB& legacy_session_error_cb, | 50 const media::LegacySessionErrorCB& legacy_session_error_cb, |
50 const media::SessionKeysChangeCB& session_keys_change_cb, | 51 const media::SessionKeysChangeCB& session_keys_change_cb, |
51 const media::SessionExpirationUpdateCB& session_expiration_update_cb) | 52 const media::SessionExpirationUpdateCB& session_expiration_update_cb, |
52 override; | 53 const CdmCreatedCB& cdm_created_cb) override; |
53 | 54 |
54 private: | 55 private: |
55 #if defined(ENABLE_PEPPER_CDMS) | 56 #if defined(ENABLE_PEPPER_CDMS) |
56 CreatePepperCdmCB create_pepper_cdm_cb_; | 57 CreatePepperCdmCB create_pepper_cdm_cb_; |
57 #elif defined(ENABLE_BROWSER_CDMS) | 58 #elif defined(ENABLE_BROWSER_CDMS) |
58 // The |manager_| is a per render frame object owned by RenderFrameImpl. | 59 // The |manager_| is a per render frame object owned by RenderFrameImpl. |
59 RendererCdmManager* manager_; | 60 RendererCdmManager* manager_; |
60 #endif | 61 #endif |
61 | 62 |
62 base::ThreadChecker thread_checker_; | 63 base::ThreadChecker thread_checker_; |
63 | 64 |
64 DISALLOW_COPY_AND_ASSIGN(RenderCdmFactory); | 65 DISALLOW_COPY_AND_ASSIGN(RenderCdmFactory); |
65 }; | 66 }; |
66 | 67 |
67 } // namespace content | 68 } // namespace content |
68 | 69 |
69 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_RENDER_CDM_FACTORY_H_ | 70 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_RENDER_CDM_FACTORY_H_ |
OLD | NEW |