OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_BLINK_CDM_SESSION_ADAPTER_H_ | 5 #ifndef MEDIA_BLINK_CDM_SESSION_ADAPTER_H_ |
6 #define MEDIA_BLINK_CDM_SESSION_ADAPTER_H_ | 6 #define MEDIA_BLINK_CDM_SESSION_ADAPTER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 friend class base::RefCounted<CdmSessionAdapter>; | 96 friend class base::RefCounted<CdmSessionAdapter>; |
97 typedef base::hash_map<std::string, | 97 typedef base::hash_map<std::string, |
98 base::WeakPtr<WebContentDecryptionModuleSessionImpl> > | 98 base::WeakPtr<WebContentDecryptionModuleSessionImpl> > |
99 SessionMap; | 99 SessionMap; |
100 | 100 |
101 ~CdmSessionAdapter(); | 101 ~CdmSessionAdapter(); |
102 | 102 |
103 // Callbacks for firing session events. | 103 // Callbacks for firing session events. |
104 void OnSessionMessage(const std::string& web_session_id, | 104 void OnSessionMessage(const std::string& web_session_id, |
105 MediaKeys::MessageType message_type, | 105 MediaKeys::MessageType message_type, |
106 const std::vector<uint8>& message); | 106 const std::vector<uint8>& message, |
| 107 const GURL& legacy_destination_url); |
107 void OnSessionKeysChange(const std::string& web_session_id, | 108 void OnSessionKeysChange(const std::string& web_session_id, |
108 bool has_additional_usable_key, | 109 bool has_additional_usable_key, |
109 CdmKeysInfo keys_info); | 110 CdmKeysInfo keys_info); |
110 void OnSessionExpirationUpdate(const std::string& web_session_id, | 111 void OnSessionExpirationUpdate(const std::string& web_session_id, |
111 const base::Time& new_expiry_time); | 112 const base::Time& new_expiry_time); |
112 void OnSessionClosed(const std::string& web_session_id); | 113 void OnSessionClosed(const std::string& web_session_id); |
113 void OnSessionError(const std::string& web_session_id, | 114 void OnSessionError(const std::string& web_session_id, |
114 MediaKeys::Exception exception_code, | 115 MediaKeys::Exception exception_code, |
115 uint32 system_code, | 116 uint32 system_code, |
116 const std::string& error_message); | 117 const std::string& error_message); |
(...skipping 10 matching lines...) Expand all Loading... |
127 | 128 |
128 // NOTE: Weak pointers must be invalidated before all other member variables. | 129 // NOTE: Weak pointers must be invalidated before all other member variables. |
129 base::WeakPtrFactory<CdmSessionAdapter> weak_ptr_factory_; | 130 base::WeakPtrFactory<CdmSessionAdapter> weak_ptr_factory_; |
130 | 131 |
131 DISALLOW_COPY_AND_ASSIGN(CdmSessionAdapter); | 132 DISALLOW_COPY_AND_ASSIGN(CdmSessionAdapter); |
132 }; | 133 }; |
133 | 134 |
134 } // namespace media | 135 } // namespace media |
135 | 136 |
136 #endif // MEDIA_BLINK_CDM_SESSION_ADAPTER_H_ | 137 #endif // MEDIA_BLINK_CDM_SESSION_ADAPTER_H_ |
OLD | NEW |