Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_RENDERER_CDM_MANAGER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_CRYPTO_RENDERER_CDM_MANAGER_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_CRYPTO_RENDERER_CDM_MANAGER_H_ | 6 #define CONTENT_RENDERER_MEDIA_CRYPTO_RENDERER_CDM_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "content/common/media/cdm_messages_enums.h" | 13 #include "content/common/media/cdm_messages_enums.h" |
| 14 #include "content/public/renderer/render_frame_observer.h" | 14 #include "content/public/renderer/render_frame_observer.h" |
| 15 #include "media/base/media_keys.h" | 15 #include "media/base/media_keys.h" |
| 16 #include "url/gurl.h" | 16 #include "url/gurl.h" |
| 17 | 17 |
| 18 namespace blink { | 18 namespace blink { |
| 19 class WebFrame; | 19 class WebFrame; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace media { | |
| 23 struct CdmConfig; | |
|
ddorwin
2015/05/13 06:03:20
ditto
sandersd (OOO until July 31)
2015/05/14 00:06:57
Done.
| |
| 24 } // namespace media | |
| 25 | |
| 22 namespace content { | 26 namespace content { |
| 23 | 27 |
| 24 class ProxyMediaKeys; | 28 class ProxyMediaKeys; |
| 25 | 29 |
| 26 // Class for managing all the CDM objects in the same RenderFrame. | 30 // Class for managing all the CDM objects in the same RenderFrame. |
| 27 class RendererCdmManager : public RenderFrameObserver { | 31 class RendererCdmManager : public RenderFrameObserver { |
| 28 public: | 32 public: |
| 29 // Constructs a RendererCdmManager object for the |render_frame|. | 33 // Constructs a RendererCdmManager object for the |render_frame|. |
| 30 explicit RendererCdmManager(RenderFrame* render_frame); | 34 explicit RendererCdmManager(RenderFrame* render_frame); |
| 31 ~RendererCdmManager() override; | 35 ~RendererCdmManager() override; |
| 32 | 36 |
| 33 // RenderFrameObserver overrides. | 37 // RenderFrameObserver overrides. |
| 34 bool OnMessageReceived(const IPC::Message& msg) override; | 38 bool OnMessageReceived(const IPC::Message& msg) override; |
| 35 | 39 |
| 36 // Encrypted media related methods. | 40 // Encrypted media related methods. |
| 37 void InitializeCdm(int cdm_id, | 41 void InitializeCdm(int cdm_id, |
| 38 uint32_t promise_id, | 42 uint32_t promise_id, |
| 39 ProxyMediaKeys* media_keys, | 43 ProxyMediaKeys* media_keys, |
| 40 const std::string& key_system, | 44 const std::string& key_system, |
| 41 const GURL& security_origin); | 45 const GURL& security_origin, |
| 46 bool use_secure_codecs); | |
| 42 void SetServerCertificate(int cdm_id, | 47 void SetServerCertificate(int cdm_id, |
| 43 uint32_t promise_id, | 48 uint32_t promise_id, |
| 44 const std::vector<uint8>& certificate); | 49 const std::vector<uint8>& certificate); |
| 45 void CreateSessionAndGenerateRequest( | 50 void CreateSessionAndGenerateRequest( |
| 46 int cdm_id, | 51 int cdm_id, |
| 47 uint32_t promise_id, | 52 uint32_t promise_id, |
| 48 CdmHostMsg_CreateSession_InitDataType init_data_type, | 53 CdmHostMsg_CreateSession_InitDataType init_data_type, |
| 49 const std::vector<uint8>& init_data); | 54 const std::vector<uint8>& init_data); |
| 50 void UpdateSession(int cdm_id, | 55 void UpdateSession(int cdm_id, |
| 51 uint32_t promise_id, | 56 uint32_t promise_id, |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 103 | 108 |
| 104 // CDM ID to ProxyMediaKeys mapping. | 109 // CDM ID to ProxyMediaKeys mapping. |
| 105 std::map<int, ProxyMediaKeys*> proxy_media_keys_map_; | 110 std::map<int, ProxyMediaKeys*> proxy_media_keys_map_; |
| 106 | 111 |
| 107 DISALLOW_COPY_AND_ASSIGN(RendererCdmManager); | 112 DISALLOW_COPY_AND_ASSIGN(RendererCdmManager); |
| 108 }; | 113 }; |
| 109 | 114 |
| 110 } // namespace content | 115 } // namespace content |
| 111 | 116 |
| 112 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_RENDERER_CDM_MANAGER_H_ | 117 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_RENDERER_CDM_MANAGER_H_ |
| OLD | NEW |