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_BROWSER_MEDIA_CDM_BROWSER_CDM_MANAGER_H_ | 5 #ifndef CONTENT_BROWSER_MEDIA_CDM_BROWSER_CDM_MANAGER_H_ |
| 6 #define CONTENT_BROWSER_MEDIA_CDM_BROWSER_CDM_MANAGER_H_ | 6 #define CONTENT_BROWSER_MEDIA_CDM_BROWSER_CDM_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 101 | 101 |
| 102 void SendSessionError(int render_frame_id, int cdm_id, uint32 session_id); | 102 void SendSessionError(int render_frame_id, int cdm_id, uint32 session_id); |
| 103 | 103 |
| 104 // Adds a new CDM identified by |cdm_id| for the given |key_system| and | 104 // Adds a new CDM identified by |cdm_id| for the given |key_system| and |
| 105 // |security_origin|. | 105 // |security_origin|. |
| 106 void AddCdm(int render_frame_id, | 106 void AddCdm(int render_frame_id, |
| 107 int cdm_id, | 107 int cdm_id, |
| 108 const std::string& key_system, | 108 const std::string& key_system, |
| 109 const GURL& security_origin); | 109 const GURL& security_origin); |
| 110 | 110 |
| 111 // Removes all CDMs associated with |render_frame_id|. | |
| 112 void RemoveCdmsForFrame(int render_frame_id); | |
|
damienv1
2014/11/16 00:00:46
nit: Would rather name it: RemoveAllCdmForFrame (C
gunsch
2014/11/17 16:17:37
Done.
| |
| 113 | |
| 111 // Removes the CDM with the specified id. | 114 // Removes the CDM with the specified id. |
| 112 void RemoveCdm(uint64 id); | 115 void RemoveCdm(uint64 id); |
| 113 | 116 |
| 114 // If |permitted| is false, it does nothing but send | 117 // If |permitted| is false, it does nothing but send |
| 115 // |CdmMsg_SessionError| IPC message. | 118 // |CdmMsg_SessionError| IPC message. |
| 116 // The primary use case is infobar permission callback, i.e., when infobar | 119 // The primary use case is infobar permission callback, i.e., when infobar |
| 117 // can decide user's intention either from interacting with the actual info | 120 // can decide user's intention either from interacting with the actual info |
| 118 // bar or from the saved preference. | 121 // bar or from the saved preference. |
| 119 void CreateSessionIfPermitted(int render_frame_id, | 122 void CreateSessionIfPermitted(int render_frame_id, |
| 120 int cdm_id, | 123 int cdm_id, |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 141 | 144 |
| 142 // Map of callbacks to cancel the permission request. | 145 // Map of callbacks to cancel the permission request. |
| 143 std::map<uint64, base::Closure> cdm_cancel_permission_map_; | 146 std::map<uint64, base::Closure> cdm_cancel_permission_map_; |
| 144 | 147 |
| 145 DISALLOW_COPY_AND_ASSIGN(BrowserCdmManager); | 148 DISALLOW_COPY_AND_ASSIGN(BrowserCdmManager); |
| 146 }; | 149 }; |
| 147 | 150 |
| 148 } // namespace content | 151 } // namespace content |
| 149 | 152 |
| 150 #endif // CONTENT_BROWSER_MEDIA_CDM_BROWSER_CDM_MANAGER_H_ | 153 #endif // CONTENT_BROWSER_MEDIA_CDM_BROWSER_CDM_MANAGER_H_ |
| OLD | NEW |