| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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) override; | 54 void Initialize(const std::string& key_system, |
| 55 bool allow_distinctive_identifier, |
| 56 bool allow_persistent_state) override; |
| 55 void SetServerCertificate(uint32_t promise_id, | 57 void SetServerCertificate(uint32_t promise_id, |
| 56 pp::VarArrayBuffer server_certificate) override; | 58 pp::VarArrayBuffer server_certificate) override; |
| 57 void CreateSessionAndGenerateRequest(uint32_t promise_id, | 59 void CreateSessionAndGenerateRequest(uint32_t promise_id, |
| 58 PP_SessionType session_type, | 60 PP_SessionType session_type, |
| 59 const std::string& init_data_type, | 61 const std::string& init_data_type, |
| 60 pp::VarArrayBuffer init_data) override; | 62 pp::VarArrayBuffer init_data) override; |
| 61 void LoadSession(uint32_t promise_id, | 63 void LoadSession(uint32_t promise_id, |
| 62 PP_SessionType session_type, | 64 PP_SessionType session_type, |
| 63 const std::string& session_id) override; | 65 const std::string& session_id) override; |
| 64 void UpdateSession(uint32_t promise_id, | 66 void UpdateSession(uint32_t promise_id, |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 // Tracks whether an output protection query and a positive query result (no | 283 // Tracks whether an output protection query and a positive query result (no |
| 282 // unprotected external link) have been reported to UMA. | 284 // unprotected external link) have been reported to UMA. |
| 283 bool uma_for_output_protection_query_reported_; | 285 bool uma_for_output_protection_query_reported_; |
| 284 bool uma_for_output_protection_positive_result_reported_; | 286 bool uma_for_output_protection_positive_result_reported_; |
| 285 #endif | 287 #endif |
| 286 | 288 |
| 287 PpbBufferAllocator allocator_; | 289 PpbBufferAllocator allocator_; |
| 288 pp::CompletionCallbackFactory<CdmAdapter> callback_factory_; | 290 pp::CompletionCallbackFactory<CdmAdapter> callback_factory_; |
| 289 linked_ptr<CdmWrapper> cdm_; | 291 linked_ptr<CdmWrapper> cdm_; |
| 290 std::string key_system_; | 292 std::string key_system_; |
| 293 bool allow_distinctive_identifier_; |
| 294 bool allow_persistent_state_; |
| 291 | 295 |
| 292 // If the CDM returned kDeferredInitialization during InitializeAudioDecoder() | 296 // If the CDM returned kDeferredInitialization during InitializeAudioDecoder() |
| 293 // or InitializeVideoDecoder(), the (Audio|Video)DecoderConfig.request_id is | 297 // or InitializeVideoDecoder(), the (Audio|Video)DecoderConfig.request_id is |
| 294 // saved for the future call to OnDeferredInitializationDone(). | 298 // saved for the future call to OnDeferredInitializationDone(). |
| 295 bool deferred_initialize_audio_decoder_; | 299 bool deferred_initialize_audio_decoder_; |
| 296 uint32_t deferred_audio_decoder_config_id_; | 300 uint32_t deferred_audio_decoder_config_id_; |
| 297 bool deferred_initialize_video_decoder_; | 301 bool deferred_initialize_video_decoder_; |
| 298 uint32_t deferred_video_decoder_config_id_; | 302 uint32_t deferred_video_decoder_config_id_; |
| 299 | 303 |
| 300 uint32_t last_read_file_size_kb_; | 304 uint32_t last_read_file_size_kb_; |
| 301 bool file_size_uma_reported_; | 305 bool file_size_uma_reported_; |
| 302 | 306 |
| 303 DISALLOW_COPY_AND_ASSIGN(CdmAdapter); | 307 DISALLOW_COPY_AND_ASSIGN(CdmAdapter); |
| 304 }; | 308 }; |
| 305 | 309 |
| 306 } // namespace media | 310 } // namespace media |
| 307 | 311 |
| 308 #endif // MEDIA_CDM_PPAPI_CDM_ADAPTER_H_ | 312 #endif // MEDIA_CDM_PPAPI_CDM_ADAPTER_H_ |
| OLD | NEW |