OLD | NEW |
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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 // CDM adapter instance. The name of the CDM adapter issuing the log message | 238 // CDM adapter instance. The name of the CDM adapter issuing the log message |
239 // will be automatically prepended to the message. | 239 // will be automatically prepended to the message. |
240 void LogToConsole(const pp::Var& value); | 240 void LogToConsole(const pp::Var& value); |
241 #endif // !defined(NDEBUG) | 241 #endif // !defined(NDEBUG) |
242 | 242 |
243 #if defined(OS_CHROMEOS) | 243 #if defined(OS_CHROMEOS) |
244 void ReportOutputProtectionUMA(OutputProtectionStatus status); | 244 void ReportOutputProtectionUMA(OutputProtectionStatus status); |
245 void ReportOutputProtectionQuery(); | 245 void ReportOutputProtectionQuery(); |
246 void ReportOutputProtectionQueryResult(); | 246 void ReportOutputProtectionQueryResult(); |
247 | 247 |
248 void SendPlatformChallengeDone(int32_t result); | 248 struct PepperPlatformChallengeResponse { |
| 249 pp::Var signed_data; |
| 250 pp::Var signed_data_signature; |
| 251 pp::Var platform_key_certificate; |
| 252 }; |
| 253 |
| 254 void SendPlatformChallengeDone( |
| 255 int32_t result, |
| 256 const linked_ptr<PepperPlatformChallengeResponse>& response); |
249 void EnableProtectionDone(int32_t result); | 257 void EnableProtectionDone(int32_t result); |
250 void QueryOutputProtectionStatusDone(int32_t result); | 258 void QueryOutputProtectionStatusDone(int32_t result); |
251 | 259 |
252 pp::OutputProtection_Private output_protection_; | 260 pp::OutputProtection_Private output_protection_; |
253 pp::PlatformVerification platform_verification_; | 261 pp::PlatformVerification platform_verification_; |
254 | 262 |
255 // Since PPAPI doesn't provide handlers for CompletionCallbacks with more than | |
256 // one output we need to manage our own. These values are only read by | |
257 // SendPlatformChallengeDone(). | |
258 pp::Var signed_data_output_; | |
259 pp::Var signed_data_signature_output_; | |
260 pp::Var platform_key_certificate_output_; | |
261 bool challenge_in_progress_; | |
262 | |
263 // Same as above, these are only read by QueryOutputProtectionStatusDone(). | 263 // Same as above, these are only read by QueryOutputProtectionStatusDone(). |
264 uint32_t output_link_mask_; | 264 uint32_t output_link_mask_; |
265 uint32_t output_protection_mask_; | 265 uint32_t output_protection_mask_; |
266 bool query_output_protection_in_progress_; | 266 bool query_output_protection_in_progress_; |
267 | 267 |
268 // Tracks whether an output protection query and a positive query result (no | 268 // Tracks whether an output protection query and a positive query result (no |
269 // unprotected external link) have been reported to UMA. | 269 // unprotected external link) have been reported to UMA. |
270 bool uma_for_output_protection_query_reported_; | 270 bool uma_for_output_protection_query_reported_; |
271 bool uma_for_output_protection_positive_result_reported_; | 271 bool uma_for_output_protection_positive_result_reported_; |
272 #endif | 272 #endif |
(...skipping 10 matching lines...) Expand all Loading... |
283 uint32_t deferred_audio_decoder_config_id_; | 283 uint32_t deferred_audio_decoder_config_id_; |
284 bool deferred_initialize_video_decoder_; | 284 bool deferred_initialize_video_decoder_; |
285 uint32_t deferred_video_decoder_config_id_; | 285 uint32_t deferred_video_decoder_config_id_; |
286 | 286 |
287 DISALLOW_COPY_AND_ASSIGN(CdmAdapter); | 287 DISALLOW_COPY_AND_ASSIGN(CdmAdapter); |
288 }; | 288 }; |
289 | 289 |
290 } // namespace media | 290 } // namespace media |
291 | 291 |
292 #endif // MEDIA_CDM_PPAPI_CDM_ADAPTER_H_ | 292 #endif // MEDIA_CDM_PPAPI_CDM_ADAPTER_H_ |
OLD | NEW |