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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 typedef std::map<uint32, std::string> SessionIdMap; | 93 typedef std::map<uint32, std::string> SessionIdMap; |
94 | 94 |
95 // Helper function to create MediaKeys to handle the given |key_system|. | 95 // Helper function to create MediaKeys to handle the given |key_system|. |
96 scoped_ptr<media::MediaKeys> CreateMediaKeys(const std::string& key_system, | 96 scoped_ptr<media::MediaKeys> CreateMediaKeys(const std::string& key_system, |
97 const GURL& security_origin); | 97 const GURL& security_origin); |
98 | 98 |
99 // Callbacks for firing session events. | 99 // Callbacks for firing session events. |
100 void OnSessionCreated(uint32 session_id, const std::string& web_session_id); | 100 void OnSessionCreated(uint32 session_id, const std::string& web_session_id); |
101 void OnSessionMessage(uint32 session_id, | 101 void OnSessionMessage(uint32 session_id, |
102 const std::vector<uint8>& message, | 102 const std::vector<uint8>& message, |
103 const std::string& default_url); | 103 const GURL& default_url); |
104 void OnSessionReady(uint32 session_id); | 104 void OnSessionReady(uint32 session_id); |
105 void OnSessionClosed(uint32 session_id); | 105 void OnSessionClosed(uint32 session_id); |
106 void OnSessionError(uint32 session_id, | 106 void OnSessionError(uint32 session_id, |
107 media::MediaKeys::KeyError error_code, | 107 media::MediaKeys::KeyError error_code, |
108 uint32 system_code); | 108 uint32 system_code); |
109 | 109 |
110 // Helper function to determine session_id for the provided |web_session_id|. | 110 // Helper function to determine session_id for the provided |web_session_id|. |
111 uint32 LookupSessionId(const std::string& web_session_id) const; | 111 uint32 LookupSessionId(const std::string& web_session_id) const; |
112 | 112 |
113 // Helper function to determine web_session_id for the provided |session_id|. | 113 // Helper function to determine web_session_id for the provided |session_id|. |
(...skipping 30 matching lines...) Expand all 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 |