Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: content/browser/media/cdm/browser_cdm_manager.h

Issue 1131753003: Plumb |use_secure_codecs| through to BrowserCdmFactoryAndroid. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 12 matching lines...) Expand all
23 #include "media/base/eme_constants.h" 23 #include "media/base/eme_constants.h"
24 #include "media/base/media_keys.h" 24 #include "media/base/media_keys.h"
25 #include "url/gurl.h" 25 #include "url/gurl.h"
26 26
27 namespace media { 27 namespace media {
28 class BrowserCdm; 28 class BrowserCdm;
29 } 29 }
30 30
31 namespace content { 31 namespace content {
32 32
33 struct InitializeCdmParameters;
34
33 // This class manages all CDM objects. It receives control operations from the 35 // This class manages all CDM objects. It receives control operations from the
34 // the render process, and forwards them to corresponding CDM object. Callbacks 36 // the render process, and forwards them to corresponding CDM object. Callbacks
35 // from CDM objects are converted to IPCs and then sent to the render process. 37 // from CDM objects are converted to IPCs and then sent to the render process.
36 class CONTENT_EXPORT BrowserCdmManager : public BrowserMessageFilter { 38 class CONTENT_EXPORT BrowserCdmManager : public BrowserMessageFilter {
37 public: 39 public:
38 // Returns the BrowserCdmManager associated with the |render_process_id|. 40 // Returns the BrowserCdmManager associated with the |render_process_id|.
39 // Returns NULL if no BrowserCdmManager is associated. 41 // Returns NULL if no BrowserCdmManager is associated.
40 static BrowserCdmManager* FromProcess(int render_process_id); 42 static BrowserCdmManager* FromProcess(int render_process_id);
41 43
42 // Constructs the BrowserCdmManager for |render_process_id| which runs on 44 // Constructs the BrowserCdmManager for |render_process_id| which runs on
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 media::CdmKeysInfo keys_info); 104 media::CdmKeysInfo keys_info);
103 void OnSessionExpirationUpdate(int render_frame_id, 105 void OnSessionExpirationUpdate(int render_frame_id,
104 int cdm_id, 106 int cdm_id,
105 const std::string& session_id, 107 const std::string& session_id,
106 const base::Time& new_expiry_time); 108 const base::Time& new_expiry_time);
107 109
108 // Message handlers. 110 // Message handlers.
109 void OnInitializeCdm(int render_frame_id, 111 void OnInitializeCdm(int render_frame_id,
110 int cdm_id, 112 int cdm_id,
111 uint32_t promise_id, 113 uint32_t promise_id,
112 const std::string& key_system, 114 InitializeCdmParameters& parameters);
ddorwin 2015/05/13 06:03:20 const
sandersd (OOO until July 31) 2015/05/13 18:17:14 Done.
113 const GURL& frame_url);
114 void OnSetServerCertificate(int render_frame_id, 115 void OnSetServerCertificate(int render_frame_id,
115 int cdm_id, 116 int cdm_id,
116 uint32_t promise_id, 117 uint32_t promise_id,
117 const std::vector<uint8_t>& certificate); 118 const std::vector<uint8_t>& certificate);
118 void OnCreateSessionAndGenerateRequest( 119 void OnCreateSessionAndGenerateRequest(
119 int render_frame_id, 120 int render_frame_id,
120 int cdm_id, 121 int cdm_id,
121 uint32_t promise_id, 122 uint32_t promise_id,
122 CdmHostMsg_CreateSession_InitDataType init_data_type, 123 CdmHostMsg_CreateSession_InitDataType init_data_type,
123 const std::vector<uint8>& init_data); 124 const std::vector<uint8>& init_data);
124 void OnUpdateSession(int render_frame_id, 125 void OnUpdateSession(int render_frame_id,
125 int cdm_id, 126 int cdm_id,
126 uint32_t promise_id, 127 uint32_t promise_id,
127 const std::string& session_id, 128 const std::string& session_id,
128 const std::vector<uint8>& response); 129 const std::vector<uint8>& response);
129 void OnCloseSession(int render_frame_id, 130 void OnCloseSession(int render_frame_id,
130 int cdm_id, 131 int cdm_id,
131 uint32_t promise_id, 132 uint32_t promise_id,
132 const std::string& session_id); 133 const std::string& session_id);
133 void OnDestroyCdm(int render_frame_id, int cdm_id); 134 void OnDestroyCdm(int render_frame_id, int cdm_id);
134 135
135 // Adds a new CDM identified by |cdm_id| for the given |key_system| and 136 // Adds a new CDM identified by |cdm_id| for the given |key_system| and
136 // |security_origin|. 137 // |security_origin|.
137 void AddCdm(int render_frame_id, 138 void AddCdm(int render_frame_id,
138 int cdm_id, 139 int cdm_id,
139 uint32_t promise_id, 140 uint32_t promise_id,
140 const std::string& key_system, 141 const std::string& key_system,
141 const GURL& security_origin); 142 const GURL& security_origin,
143 bool use_secure_codecs);
142 144
143 // Removes all CDMs associated with |render_frame_id|. 145 // Removes all CDMs associated with |render_frame_id|.
144 void RemoveAllCdmForFrame(int render_frame_id); 146 void RemoveAllCdmForFrame(int render_frame_id);
145 147
146 // Removes the CDM with the specified id. 148 // Removes the CDM with the specified id.
147 void RemoveCdm(uint64 id); 149 void RemoveCdm(uint64 id);
148 150
149 using PermissionStatusCB = base::Callback<void(bool)>; 151 using PermissionStatusCB = base::Callback<void(bool)>;
150 152
151 // Checks protected media identifier permission for the given 153 // Checks protected media identifier permission for the given
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 std::map<uint64, GURL> cdm_security_origin_map_; 190 std::map<uint64, GURL> cdm_security_origin_map_;
189 191
190 base::WeakPtrFactory<BrowserCdmManager> weak_ptr_factory_; 192 base::WeakPtrFactory<BrowserCdmManager> weak_ptr_factory_;
191 193
192 DISALLOW_COPY_AND_ASSIGN(BrowserCdmManager); 194 DISALLOW_COPY_AND_ASSIGN(BrowserCdmManager);
193 }; 195 };
194 196
195 } // namespace content 197 } // namespace content
196 198
197 #endif // CONTENT_BROWSER_MEDIA_CDM_BROWSER_CDM_MANAGER_H_ 199 #endif // CONTENT_BROWSER_MEDIA_CDM_BROWSER_CDM_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698