| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 WEBKIT_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_ | 5 #ifndef WEBKIT_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_ |
| 6 #define WEBKIT_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_ | 6 #define WEBKIT_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 // This class should always be created & destroyed on the main renderer thread. | 33 // This class should always be created & destroyed on the main renderer thread. |
| 34 class PpapiDecryptor : public media::Decryptor { | 34 class PpapiDecryptor : public media::Decryptor { |
| 35 public: | 35 public: |
| 36 PpapiDecryptor( | 36 PpapiDecryptor( |
| 37 media::DecryptorClient* client, | 37 media::DecryptorClient* client, |
| 38 const scoped_refptr<webkit::ppapi::PluginInstance>& plugin_instance); | 38 const scoped_refptr<webkit::ppapi::PluginInstance>& plugin_instance); |
| 39 virtual ~PpapiDecryptor(); | 39 virtual ~PpapiDecryptor(); |
| 40 | 40 |
| 41 // media::Decryptor implementation. | 41 // media::Decryptor implementation. |
| 42 virtual bool GenerateKeyRequest(const std::string& key_system, | 42 virtual bool GenerateKeyRequest(const std::string& key_system, |
| 43 const std::string& type, |
| 43 const uint8* init_data, | 44 const uint8* init_data, |
| 44 int init_data_length) OVERRIDE; | 45 int init_data_length) OVERRIDE; |
| 45 virtual void AddKey(const std::string& key_system, | 46 virtual void AddKey(const std::string& key_system, |
| 46 const uint8* key, | 47 const uint8* key, |
| 47 int key_length, | 48 int key_length, |
| 48 const uint8* init_data, | 49 const uint8* init_data, |
| 49 int init_data_length, | 50 int init_data_length, |
| 50 const std::string& session_id) OVERRIDE; | 51 const std::string& session_id) OVERRIDE; |
| 51 virtual void CancelKeyRequest(const std::string& key_system, | 52 virtual void CancelKeyRequest(const std::string& key_system, |
| 52 const std::string& session_id) OVERRIDE; | 53 const std::string& session_id) OVERRIDE; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 91 |
| 91 base::WeakPtrFactory<PpapiDecryptor> weak_ptr_factory_; | 92 base::WeakPtrFactory<PpapiDecryptor> weak_ptr_factory_; |
| 92 base::WeakPtr<PpapiDecryptor> weak_this_; | 93 base::WeakPtr<PpapiDecryptor> weak_this_; |
| 93 | 94 |
| 94 DISALLOW_COPY_AND_ASSIGN(PpapiDecryptor); | 95 DISALLOW_COPY_AND_ASSIGN(PpapiDecryptor); |
| 95 }; | 96 }; |
| 96 | 97 |
| 97 } // namespace webkit_media | 98 } // namespace webkit_media |
| 98 | 99 |
| 99 #endif // WEBKIT_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_ | 100 #endif // WEBKIT_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_ |
| OLD | NEW |