| 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 CONTENT_RENDERER_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_ | 6 #define CONTENT_RENDERER_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 bool allow_distinctive_identifier, | 41 bool allow_distinctive_identifier, |
| 42 bool allow_persistent_state, | 42 bool allow_persistent_state, |
| 43 const CreatePepperCdmCB& create_pepper_cdm_cb, | 43 const CreatePepperCdmCB& create_pepper_cdm_cb, |
| 44 const media::SessionMessageCB& session_message_cb, | 44 const media::SessionMessageCB& session_message_cb, |
| 45 const media::SessionClosedCB& session_closed_cb, | 45 const media::SessionClosedCB& session_closed_cb, |
| 46 const media::LegacySessionErrorCB& legacy_session_error_cb, | 46 const media::LegacySessionErrorCB& legacy_session_error_cb, |
| 47 const media::SessionKeysChangeCB& session_keys_change_cb, | 47 const media::SessionKeysChangeCB& session_keys_change_cb, |
| 48 const media::SessionExpirationUpdateCB& session_expiration_update_cb, | 48 const media::SessionExpirationUpdateCB& session_expiration_update_cb, |
| 49 const media::CdmCreatedCB& cdm_created_cb); | 49 const media::CdmCreatedCB& cdm_created_cb); |
| 50 | 50 |
| 51 ~PpapiDecryptor() override; | |
| 52 | |
| 53 // media::MediaKeys implementation. | 51 // media::MediaKeys implementation. |
| 54 void SetServerCertificate( | 52 void SetServerCertificate( |
| 55 const std::vector<uint8_t>& certificate, | 53 const std::vector<uint8_t>& certificate, |
| 56 scoped_ptr<media::SimpleCdmPromise> promise) override; | 54 scoped_ptr<media::SimpleCdmPromise> promise) override; |
| 57 void CreateSessionAndGenerateRequest( | 55 void CreateSessionAndGenerateRequest( |
| 58 SessionType session_type, | 56 SessionType session_type, |
| 59 media::EmeInitDataType init_data_type, | 57 media::EmeInitDataType init_data_type, |
| 60 const std::vector<uint8_t>& init_data, | 58 const std::vector<uint8_t>& init_data, |
| 61 scoped_ptr<media::NewSessionCdmPromise> promise) override; | 59 scoped_ptr<media::NewSessionCdmPromise> promise) override; |
| 62 void LoadSession(SessionType session_type, | 60 void LoadSession(SessionType session_type, |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 95 |
| 98 private: | 96 private: |
| 99 PpapiDecryptor( | 97 PpapiDecryptor( |
| 100 scoped_ptr<PepperCdmWrapper> pepper_cdm_wrapper, | 98 scoped_ptr<PepperCdmWrapper> pepper_cdm_wrapper, |
| 101 const media::SessionMessageCB& session_message_cb, | 99 const media::SessionMessageCB& session_message_cb, |
| 102 const media::SessionClosedCB& session_closed_cb, | 100 const media::SessionClosedCB& session_closed_cb, |
| 103 const media::LegacySessionErrorCB& legacy_session_error_cb, | 101 const media::LegacySessionErrorCB& legacy_session_error_cb, |
| 104 const media::SessionKeysChangeCB& session_keys_change_cb, | 102 const media::SessionKeysChangeCB& session_keys_change_cb, |
| 105 const media::SessionExpirationUpdateCB& session_expiration_update_cb); | 103 const media::SessionExpirationUpdateCB& session_expiration_update_cb); |
| 106 | 104 |
| 105 ~PpapiDecryptor() override; |
| 106 |
| 107 void InitializeCdm(const std::string& key_system, | 107 void InitializeCdm(const std::string& key_system, |
| 108 bool allow_distinctive_identifier, | 108 bool allow_distinctive_identifier, |
| 109 bool allow_persistent_state, | 109 bool allow_persistent_state, |
| 110 scoped_ptr<media::SimpleCdmPromise> promise); | 110 scoped_ptr<media::SimpleCdmPromise> promise); |
| 111 | 111 |
| 112 void OnDecoderInitialized(StreamType stream_type, bool success); | 112 void OnDecoderInitialized(StreamType stream_type, bool success); |
| 113 | 113 |
| 114 // Callbacks for |plugin_cdm_delegate_| to fire session events. | 114 // Callbacks for |plugin_cdm_delegate_| to fire session events. |
| 115 void OnSessionMessage(const std::string& session_id, | 115 void OnSessionMessage(const std::string& session_id, |
| 116 MediaKeys::MessageType message_type, | 116 MediaKeys::MessageType message_type, |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 | 156 |
| 157 // NOTE: Weak pointers must be invalidated before all other member variables. | 157 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 158 base::WeakPtrFactory<PpapiDecryptor> weak_ptr_factory_; | 158 base::WeakPtrFactory<PpapiDecryptor> weak_ptr_factory_; |
| 159 | 159 |
| 160 DISALLOW_COPY_AND_ASSIGN(PpapiDecryptor); | 160 DISALLOW_COPY_AND_ASSIGN(PpapiDecryptor); |
| 161 }; | 161 }; |
| 162 | 162 |
| 163 } // namespace content | 163 } // namespace content |
| 164 | 164 |
| 165 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_ | 165 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_ |
| OLD | NEW |