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

Side by Side Diff: media/cdm/ppapi/cdm_adapter.h

Issue 1102363005: Initialize the CDM asynchronously (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase + Android compile changes 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
« no previous file with comments | « media/blink/webmediaplayer_impl.cc ('k') | media/cdm/ppapi/cdm_adapter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 MEDIA_CDM_PPAPI_CDM_ADAPTER_H_ 5 #ifndef MEDIA_CDM_PPAPI_CDM_ADAPTER_H_
6 #define MEDIA_CDM_PPAPI_CDM_ADAPTER_H_ 6 #define MEDIA_CDM_PPAPI_CDM_ADAPTER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 virtual ~CdmAdapter(); 44 virtual ~CdmAdapter();
45 45
46 // pp::Instance implementation. 46 // pp::Instance implementation.
47 virtual bool Init(uint32_t argc, const char* argn[], const char* argv[]) { 47 virtual bool Init(uint32_t argc, const char* argn[], const char* argv[]) {
48 return true; 48 return true;
49 } 49 }
50 50
51 // PPP_ContentDecryptor_Private implementation. 51 // PPP_ContentDecryptor_Private implementation.
52 // Note: Results of calls to these methods must be reported through the 52 // Note: Results of calls to these methods must be reported through the
53 // PPB_ContentDecryptor_Private interface. 53 // PPB_ContentDecryptor_Private interface.
54 void Initialize(const std::string& key_system, 54 void Initialize(uint32_t promise_id,
55 const std::string& key_system,
55 bool allow_distinctive_identifier, 56 bool allow_distinctive_identifier,
56 bool allow_persistent_state) override; 57 bool allow_persistent_state) override;
57 void SetServerCertificate(uint32_t promise_id, 58 void SetServerCertificate(uint32_t promise_id,
58 pp::VarArrayBuffer server_certificate) override; 59 pp::VarArrayBuffer server_certificate) override;
59 void CreateSessionAndGenerateRequest(uint32_t promise_id, 60 void CreateSessionAndGenerateRequest(uint32_t promise_id,
60 PP_SessionType session_type, 61 PP_SessionType session_type,
61 PP_InitDataType init_data_type, 62 PP_InitDataType init_data_type,
62 pp::VarArrayBuffer init_data) override; 63 pp::VarArrayBuffer init_data) override;
63 void LoadSession(uint32_t promise_id, 64 void LoadSession(uint32_t promise_id,
64 PP_SessionType session_type, 65 PP_SessionType session_type,
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 cdm::MessageType message_type, 158 cdm::MessageType message_type,
158 const char* message, 159 const char* message,
159 uint32_t message_size, 160 uint32_t message_size,
160 const std::string& legacy_destination_url); 161 const std::string& legacy_destination_url);
161 std::string session_id; 162 std::string session_id;
162 cdm::MessageType message_type; 163 cdm::MessageType message_type;
163 std::vector<uint8_t> message; 164 std::vector<uint8_t> message;
164 std::string legacy_destination_url; 165 std::string legacy_destination_url;
165 }; 166 };
166 167
167 bool CreateCdmInstance(const std::string& key_system); 168 CdmWrapper* CreateCdmInstance(const std::string& key_system);
168 169
169 // <code>PPB_ContentDecryptor_Private</code> dispatchers. These are passed to 170 // <code>PPB_ContentDecryptor_Private</code> dispatchers. These are passed to
170 // <code>callback_factory_</code> to ensure that calls into 171 // <code>callback_factory_</code> to ensure that calls into
171 // <code>PPP_ContentDecryptor_Private</code> are asynchronous. 172 // <code>PPP_ContentDecryptor_Private</code> are asynchronous.
172 void SendPromiseResolvedInternal(int32_t result, uint32_t promise_id); 173 void SendPromiseResolvedInternal(int32_t result, uint32_t promise_id);
173 void SendPromiseResolvedWithSessionInternal(int32_t result, 174 void SendPromiseResolvedWithSessionInternal(int32_t result,
174 uint32_t promise_id, 175 uint32_t promise_id,
175 const std::string& session_id); 176 const std::string& session_id);
176 void SendPromiseRejectedInternal(int32_t result, 177 void SendPromiseRejectedInternal(int32_t result,
177 uint32_t promise_id, 178 uint32_t promise_id,
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 282
282 uint32_t last_read_file_size_kb_; 283 uint32_t last_read_file_size_kb_;
283 bool file_size_uma_reported_; 284 bool file_size_uma_reported_;
284 285
285 DISALLOW_COPY_AND_ASSIGN(CdmAdapter); 286 DISALLOW_COPY_AND_ASSIGN(CdmAdapter);
286 }; 287 };
287 288
288 } // namespace media 289 } // namespace media
289 290
290 #endif // MEDIA_CDM_PPAPI_CDM_ADAPTER_H_ 291 #endif // MEDIA_CDM_PPAPI_CDM_ADAPTER_H_
OLDNEW
« no previous file with comments | « media/blink/webmediaplayer_impl.cc ('k') | media/cdm/ppapi/cdm_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698