| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 void OnSessionMessage(const std::string& web_session_id, | 89 void OnSessionMessage(const std::string& web_session_id, |
| 90 const std::vector<uint8>& message, | 90 const std::vector<uint8>& message, |
| 91 const GURL& default_url); | 91 const GURL& default_url); |
| 92 void OnSessionReady(const std::string& web_session_id); | 92 void OnSessionReady(const std::string& web_session_id); |
| 93 void OnSessionClosed(const std::string& web_session_id); | 93 void OnSessionClosed(const std::string& web_session_id); |
| 94 void OnSessionError(const std::string& web_session_id, | 94 void OnSessionError(const std::string& web_session_id, |
| 95 media::MediaKeys::Exception exception_code, | 95 media::MediaKeys::Exception exception_code, |
| 96 uint32 system_code, | 96 uint32 system_code, |
| 97 const std::string& error_message); | 97 const std::string& error_message); |
| 98 | 98 |
| 99 enum SessionCreationType { |
| 100 TemporarySession, |
| 101 PersistentSession, |
| 102 LoadSession |
| 103 }; |
| 104 |
| 99 // Called when a session is actually created or loaded. | 105 // Called when a session is actually created or loaded. |
| 100 void SetSessionId(bool persistent, const std::string& web_session_id); | 106 void SetSessionId(SessionCreationType session_type, |
| 107 const std::string& web_session_id); |
| 101 | 108 |
| 102 #if defined(ENABLE_PEPPER_CDMS) | 109 #if defined(ENABLE_PEPPER_CDMS) |
| 103 // Callback to create the Pepper plugin. | 110 // Callback to create the Pepper plugin. |
| 104 CreatePepperCdmCB create_pepper_cdm_cb_; | 111 CreatePepperCdmCB create_pepper_cdm_cb_; |
| 105 #elif defined(ENABLE_BROWSER_CDMS) | 112 #elif defined(ENABLE_BROWSER_CDMS) |
| 106 RendererCdmManager* manager_; | 113 RendererCdmManager* manager_; |
| 107 int cdm_id_; | 114 int cdm_id_; |
| 108 #endif // defined(ENABLE_PEPPER_CDMS) | 115 #endif // defined(ENABLE_PEPPER_CDMS) |
| 109 | 116 |
| 110 // The real MediaKeys that manages key operations for the ProxyDecryptor. | 117 // The real MediaKeys that manages key operations for the ProxyDecryptor. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 122 | 129 |
| 123 // NOTE: Weak pointers must be invalidated before all other member variables. | 130 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 124 base::WeakPtrFactory<ProxyDecryptor> weak_ptr_factory_; | 131 base::WeakPtrFactory<ProxyDecryptor> weak_ptr_factory_; |
| 125 | 132 |
| 126 DISALLOW_COPY_AND_ASSIGN(ProxyDecryptor); | 133 DISALLOW_COPY_AND_ASSIGN(ProxyDecryptor); |
| 127 }; | 134 }; |
| 128 | 135 |
| 129 } // namespace content | 136 } // namespace content |
| 130 | 137 |
| 131 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_ | 138 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_ |
| OLD | NEW |