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 <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 void OnSessionMessage(uint32 session_id, | 98 void OnSessionMessage(uint32 session_id, |
99 const std::vector<uint8>& message, | 99 const std::vector<uint8>& message, |
100 const std::string& default_url); | 100 const std::string& default_url); |
101 void OnSessionReady(uint32 session_id); | 101 void OnSessionReady(uint32 session_id); |
102 void OnSessionClosed(uint32 session_id); | 102 void OnSessionClosed(uint32 session_id); |
103 void OnSessionError(uint32 session_id, | 103 void OnSessionError(uint32 session_id, |
104 media::MediaKeys::KeyError error_code, | 104 media::MediaKeys::KeyError error_code, |
105 int system_code); | 105 int system_code); |
106 | 106 |
107 // Helper function to determine session_id for the provided |web_session_id|. | 107 // Helper function to determine session_id for the provided |web_session_id|. |
108 uint32 LookupSessionId(const std::string& web_session_id); | 108 uint32 LookupSessionId(const std::string& web_session_id) const; |
109 | 109 |
110 // Helper function to determine web_session_id for the provided |session_id|. | 110 // Helper function to determine web_session_id for the provided |session_id|. |
111 // The returned web_session_id is only valid on the main thread, and should be | 111 // The returned web_session_id is only valid on the main thread, and should be |
112 // stored by copy. | 112 // stored by copy. |
113 const std::string& LookupWebSessionId(uint32 session_id); | 113 const std::string& LookupWebSessionId(uint32 session_id) const; |
114 | 114 |
115 base::WeakPtrFactory<ProxyDecryptor> weak_ptr_factory_; | 115 base::WeakPtrFactory<ProxyDecryptor> weak_ptr_factory_; |
116 | 116 |
117 #if defined(ENABLE_PEPPER_CDMS) | 117 #if defined(ENABLE_PEPPER_CDMS) |
118 // Callback for cleaning up a Pepper-based CDM. | 118 // Callback for cleaning up a Pepper-based CDM. |
119 void DestroyHelperPlugin(); | 119 void DestroyHelperPlugin(); |
120 | 120 |
121 // Needed to create the PpapiDecryptor. | 121 // Needed to create the PpapiDecryptor. |
122 blink::WebMediaPlayerClient* web_media_player_client_; | 122 blink::WebMediaPlayerClient* web_media_player_client_; |
123 blink::WebFrame* web_frame_; | 123 blink::WebFrame* web_frame_; |
(...skipping 18 matching lines...) Expand all Loading... |
142 SessionIdMap sessions_; | 142 SessionIdMap sessions_; |
143 | 143 |
144 bool is_clear_key_; | 144 bool is_clear_key_; |
145 | 145 |
146 DISALLOW_COPY_AND_ASSIGN(ProxyDecryptor); | 146 DISALLOW_COPY_AND_ASSIGN(ProxyDecryptor); |
147 }; | 147 }; |
148 | 148 |
149 } // namespace content | 149 } // namespace content |
150 | 150 |
151 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_ | 151 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_ |
OLD | NEW |