Chromium Code Reviews| 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 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "content/renderer/media/crypto/pepper_cdm_wrapper.h" | 14 #include "content/renderer/media/crypto/pepper_cdm_wrapper.h" |
| 15 #include "media/base/cdm_context.h" | 15 #include "media/base/cdm_context.h" |
| 16 #include "media/base/cdm_factory.h" | 16 #include "media/base/cdm_factory.h" |
| 17 #include "media/base/decryptor.h" | 17 #include "media/base/decryptor.h" |
| 18 #include "media/base/media_keys.h" | 18 #include "media/base/media_keys.h" |
| 19 #include "media/base/video_decoder_config.h" | 19 #include "media/base/video_decoder_config.h" |
| 20 | 20 |
| 21 class GURL; | 21 class GURL; |
| 22 | 22 |
| 23 namespace base { | 23 namespace base { |
| 24 class MessageLoopProxy; | 24 class MessageLoopProxy; |
| 25 } | 25 } |
| 26 | 26 |
| 27 namespace media { | |
| 28 struct CdmConfig; | |
|
ddorwin
2015/05/13 06:03:20
not used?
sandersd (OOO until July 31)
2015/05/13 18:17:14
Done. (Detritus from the first attempt that passed
| |
| 29 } // namespace media | |
| 30 | |
| 27 namespace content { | 31 namespace content { |
| 28 class ContentDecryptorDelegate; | 32 class ContentDecryptorDelegate; |
| 29 class PepperPluginInstanceImpl; | 33 class PepperPluginInstanceImpl; |
| 30 | 34 |
| 31 // PpapiDecryptor implements media::MediaKeys and media::Decryptor and forwards | 35 // PpapiDecryptor implements media::MediaKeys and media::Decryptor and forwards |
| 32 // all calls to the PluginInstance. | 36 // all calls to the PluginInstance. |
| 33 // This class should always be created & destroyed on the main renderer thread. | 37 // This class should always be created & destroyed on the main renderer thread. |
| 34 class PpapiDecryptor : public media::MediaKeys, | 38 class PpapiDecryptor : public media::MediaKeys, |
| 35 public media::CdmContext, | 39 public media::CdmContext, |
| 36 public media::Decryptor { | 40 public media::Decryptor { |
| 37 public: | 41 public: |
| 38 static void Create( | 42 static void Create( |
| 39 const std::string& key_system, | 43 const std::string& key_system, |
| 44 const GURL& security_origin, | |
| 40 bool allow_distinctive_identifier, | 45 bool allow_distinctive_identifier, |
| 41 bool allow_persistent_state, | 46 bool allow_persistent_state, |
| 42 const GURL& security_origin, | |
| 43 const CreatePepperCdmCB& create_pepper_cdm_cb, | 47 const CreatePepperCdmCB& create_pepper_cdm_cb, |
| 44 const media::SessionMessageCB& session_message_cb, | 48 const media::SessionMessageCB& session_message_cb, |
| 45 const media::SessionClosedCB& session_closed_cb, | 49 const media::SessionClosedCB& session_closed_cb, |
| 46 const media::LegacySessionErrorCB& legacy_session_error_cb, | 50 const media::LegacySessionErrorCB& legacy_session_error_cb, |
| 47 const media::SessionKeysChangeCB& session_keys_change_cb, | 51 const media::SessionKeysChangeCB& session_keys_change_cb, |
| 48 const media::SessionExpirationUpdateCB& session_expiration_update_cb, | 52 const media::SessionExpirationUpdateCB& session_expiration_update_cb, |
| 49 const media::CdmCreatedCB& cdm_created_cb); | 53 const media::CdmCreatedCB& cdm_created_cb); |
| 50 | 54 |
| 51 ~PpapiDecryptor() override; | 55 ~PpapiDecryptor() override; |
| 52 | 56 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 156 | 160 |
| 157 // NOTE: Weak pointers must be invalidated before all other member variables. | 161 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 158 base::WeakPtrFactory<PpapiDecryptor> weak_ptr_factory_; | 162 base::WeakPtrFactory<PpapiDecryptor> weak_ptr_factory_; |
| 159 | 163 |
| 160 DISALLOW_COPY_AND_ASSIGN(PpapiDecryptor); | 164 DISALLOW_COPY_AND_ASSIGN(PpapiDecryptor); |
| 161 }; | 165 }; |
| 162 | 166 |
| 163 } // namespace content | 167 } // namespace content |
| 164 | 168 |
| 165 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_ | 169 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_ |
| OLD | NEW |