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_PROXY_DECRYPTOR_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_ |
6 #define CONTENT_RENDERER_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_ | 6 #define CONTENT_RENDERER_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 class ProxyDecryptor { | 45 class ProxyDecryptor { |
46 public: | 46 public: |
47 // These are similar to the callbacks in media_keys.h, but pass back the | 47 // These are similar to the callbacks in media_keys.h, but pass back the |
48 // web session ID rather than the internal session ID. | 48 // web session ID rather than the internal session ID. |
49 typedef base::Callback<void(const std::string& session_id)> KeyAddedCB; | 49 typedef base::Callback<void(const std::string& session_id)> KeyAddedCB; |
50 typedef base::Callback<void(const std::string& session_id, | 50 typedef base::Callback<void(const std::string& session_id, |
51 media::MediaKeys::KeyError error_code, | 51 media::MediaKeys::KeyError error_code, |
52 uint32 system_code)> KeyErrorCB; | 52 uint32 system_code)> KeyErrorCB; |
53 typedef base::Callback<void(const std::string& session_id, | 53 typedef base::Callback<void(const std::string& session_id, |
54 const std::vector<uint8>& message, | 54 const std::vector<uint8>& message, |
55 const std::string& default_url)> KeyMessageCB; | 55 const GURL& destination_url)> KeyMessageCB; |
56 | 56 |
57 ProxyDecryptor( | 57 ProxyDecryptor( |
58 #if defined(ENABLE_PEPPER_CDMS) | 58 #if defined(ENABLE_PEPPER_CDMS) |
59 const CreatePepperCdmCB& create_pepper_cdm_cb, | 59 const CreatePepperCdmCB& create_pepper_cdm_cb, |
60 #elif defined(OS_ANDROID) | 60 #elif defined(OS_ANDROID) |
61 RendererCdmManager* manager, | 61 RendererCdmManager* manager, |
62 #endif // defined(ENABLE_PEPPER_CDMS) | 62 #endif // defined(ENABLE_PEPPER_CDMS) |
63 const KeyAddedCB& key_added_cb, | 63 const KeyAddedCB& key_added_cb, |
64 const KeyErrorCB& key_error_cb, | 64 const KeyErrorCB& key_error_cb, |
65 const KeyMessageCB& key_message_cb); | 65 const KeyMessageCB& key_message_cb); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 | 144 |
145 // NOTE: Weak pointers must be invalidated before all other member variables. | 145 // NOTE: Weak pointers must be invalidated before all other member variables. |
146 base::WeakPtrFactory<ProxyDecryptor> weak_ptr_factory_; | 146 base::WeakPtrFactory<ProxyDecryptor> weak_ptr_factory_; |
147 | 147 |
148 DISALLOW_COPY_AND_ASSIGN(ProxyDecryptor); | 148 DISALLOW_COPY_AND_ASSIGN(ProxyDecryptor); |
149 }; | 149 }; |
150 | 150 |
151 } // namespace content | 151 } // namespace content |
152 | 152 |
153 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_ | 153 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_ |
OLD | NEW |