| 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_CDM_RENDERER_CDM_MANAGER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_CDM_RENDERER_CDM_MANAGER_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_CDM_RENDERER_CDM_MANAGER_H_ | 6 #define CONTENT_RENDERER_MEDIA_CDM_RENDERER_CDM_MANAGER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 const std::string& session_id); | 67 const std::string& session_id); |
| 68 void DestroyCdm(int cdm_id); | 68 void DestroyCdm(int cdm_id); |
| 69 | 69 |
| 70 // Registers a ProxyMediaKeys object. Returns allocated CDM ID. | 70 // Registers a ProxyMediaKeys object. Returns allocated CDM ID. |
| 71 int RegisterMediaKeys(ProxyMediaKeys* media_keys); | 71 int RegisterMediaKeys(ProxyMediaKeys* media_keys); |
| 72 | 72 |
| 73 // Unregisters a ProxyMediaKeys object identified by |cdm_id|. | 73 // Unregisters a ProxyMediaKeys object identified by |cdm_id|. |
| 74 void UnregisterMediaKeys(int cdm_id); | 74 void UnregisterMediaKeys(int cdm_id); |
| 75 | 75 |
| 76 private: | 76 private: |
| 77 // RenderFrameObserver implementation. |
| 78 void OnDestruct() override; |
| 79 |
| 77 // Gets the pointer to ProxyMediaKeys given the |cdm_id|. | 80 // Gets the pointer to ProxyMediaKeys given the |cdm_id|. |
| 78 ProxyMediaKeys* GetMediaKeys(int cdm_id); | 81 ProxyMediaKeys* GetMediaKeys(int cdm_id); |
| 79 | 82 |
| 80 // Message handlers. | 83 // Message handlers. |
| 81 void OnSessionMessage(int cdm_id, | 84 void OnSessionMessage(int cdm_id, |
| 82 const std::string& session_id, | 85 const std::string& session_id, |
| 83 media::MediaKeys::MessageType message_type, | 86 media::MediaKeys::MessageType message_type, |
| 84 const std::vector<uint8_t>& message, | 87 const std::vector<uint8_t>& message, |
| 85 const GURL& legacy_destination_url); | 88 const GURL& legacy_destination_url); |
| 86 void OnSessionClosed(int cdm_id, const std::string& session_id); | 89 void OnSessionClosed(int cdm_id, const std::string& session_id); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 114 | 117 |
| 115 // CDM ID to ProxyMediaKeys mapping. | 118 // CDM ID to ProxyMediaKeys mapping. |
| 116 std::map<int, ProxyMediaKeys*> proxy_media_keys_map_; | 119 std::map<int, ProxyMediaKeys*> proxy_media_keys_map_; |
| 117 | 120 |
| 118 DISALLOW_COPY_AND_ASSIGN(RendererCdmManager); | 121 DISALLOW_COPY_AND_ASSIGN(RendererCdmManager); |
| 119 }; | 122 }; |
| 120 | 123 |
| 121 } // namespace content | 124 } // namespace content |
| 122 | 125 |
| 123 #endif // CONTENT_RENDERER_MEDIA_CDM_RENDERER_CDM_MANAGER_H_ | 126 #endif // CONTENT_RENDERER_MEDIA_CDM_RENDERER_CDM_MANAGER_H_ |
| OLD | NEW |