Chromium Code Reviews| 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 15 matching lines...) Expand all Loading... | |
| 26 // Forwards the session ID-based callbacks of the MediaKeys interface to the | 26 // Forwards the session ID-based callbacks of the MediaKeys interface to the |
| 27 // appropriate session object. Callers should hold references to this class | 27 // appropriate session object. Callers should hold references to this class |
| 28 // as long as they need the CDM instance. | 28 // as long as they need the CDM instance. |
| 29 class CdmSessionAdapter : public base::RefCounted<CdmSessionAdapter> { | 29 class CdmSessionAdapter : public base::RefCounted<CdmSessionAdapter> { |
| 30 public: | 30 public: |
| 31 CdmSessionAdapter(); | 31 CdmSessionAdapter(); |
| 32 | 32 |
| 33 // Returns true on success. | 33 // Returns true on success. |
| 34 bool Initialize(CdmFactory* cdm_factory, | 34 bool Initialize(CdmFactory* cdm_factory, |
| 35 const std::string& key_system, | 35 const std::string& key_system, |
| 36 bool allow_distincitve_identifier, | |
|
jrummell
2015/03/06 21:40:47
s/citve/ctive/
sandersd (OOO until July 31)
2015/03/06 22:36:58
Done.
| |
| 37 bool allow_persistent_state, | |
| 36 const GURL& security_origin); | 38 const GURL& security_origin); |
| 37 | 39 |
| 38 // Provides a server certificate to be used to encrypt messages to the | 40 // Provides a server certificate to be used to encrypt messages to the |
| 39 // license server. | 41 // license server. |
| 40 void SetServerCertificate(const uint8* server_certificate, | 42 void SetServerCertificate(const uint8* server_certificate, |
| 41 int server_certificate_length, | 43 int server_certificate_length, |
| 42 scoped_ptr<SimpleCdmPromise> promise); | 44 scoped_ptr<SimpleCdmPromise> promise); |
| 43 | 45 |
| 44 // Creates a new session and adds it to the internal map. The caller owns the | 46 // Creates a new session and adds it to the internal map. The caller owns the |
| 45 // created session. RemoveSession() must be called when destroying it, if | 47 // created session. RemoveSession() must be called when destroying it, if |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 132 | 134 |
| 133 // NOTE: Weak pointers must be invalidated before all other member variables. | 135 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 134 base::WeakPtrFactory<CdmSessionAdapter> weak_ptr_factory_; | 136 base::WeakPtrFactory<CdmSessionAdapter> weak_ptr_factory_; |
| 135 | 137 |
| 136 DISALLOW_COPY_AND_ASSIGN(CdmSessionAdapter); | 138 DISALLOW_COPY_AND_ASSIGN(CdmSessionAdapter); |
| 137 }; | 139 }; |
| 138 | 140 |
| 139 } // namespace media | 141 } // namespace media |
| 140 | 142 |
| 141 #endif // MEDIA_BLINK_CDM_SESSION_ADAPTER_H_ | 143 #endif // MEDIA_BLINK_CDM_SESSION_ADAPTER_H_ |
| OLD | NEW |