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 CHROMECAST_MEDIA_CDM_BROWSER_CDM_CAST_H_ | 5 #ifndef CHROMECAST_MEDIA_CDM_BROWSER_CDM_CAST_H_ |
6 #define CHROMECAST_MEDIA_CDM_BROWSER_CDM_CAST_H_ | 6 #define CHROMECAST_MEDIA_CDM_BROWSER_CDM_CAST_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 const ::media::LegacySessionErrorCB& legacy_session_error_cb, | 48 const ::media::LegacySessionErrorCB& legacy_session_error_cb, |
49 const ::media::SessionKeysChangeCB& session_keys_change_cb, | 49 const ::media::SessionKeysChangeCB& session_keys_change_cb, |
50 const ::media::SessionExpirationUpdateCB& session_expiration_update_cb); | 50 const ::media::SessionExpirationUpdateCB& session_expiration_update_cb); |
51 | 51 |
52 // PlayerTracker implementation. | 52 // PlayerTracker implementation. |
53 int RegisterPlayer(const base::Closure& new_key_cb, | 53 int RegisterPlayer(const base::Closure& new_key_cb, |
54 const base::Closure& cdm_unset_cb) override; | 54 const base::Closure& cdm_unset_cb) override; |
55 void UnregisterPlayer(int registration_id) override; | 55 void UnregisterPlayer(int registration_id) override; |
56 | 56 |
57 // ::media::BrowserCdm implementation: | 57 // ::media::BrowserCdm implementation: |
58 void LoadSession(::media::MediaKeys::SessionType session_type, | |
59 const std::string& session_id, | |
60 scoped_ptr<::media::NewSessionCdmPromise> promise) override; | |
61 ::media::CdmContext* GetCdmContext() override; | 58 ::media::CdmContext* GetCdmContext() override; |
62 | 59 |
63 // Returns the decryption context needed to decrypt frames encrypted with | 60 // Returns the decryption context needed to decrypt frames encrypted with |
64 // |key_id|. | 61 // |key_id|. |
65 // Returns null if |key_id| is not available. | 62 // Returns null if |key_id| is not available. |
66 virtual scoped_refptr<DecryptContext> GetDecryptContext( | 63 virtual scoped_refptr<DecryptContext> GetDecryptContext( |
67 const std::string& key_id) const = 0; | 64 const std::string& key_id) const = 0; |
68 | 65 |
69 protected: | 66 protected: |
70 void OnSessionMessage(const std::string& session_id, | 67 void OnSessionMessage(const std::string& session_id, |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 | 135 |
139 base::ThreadChecker thread_checker_; | 136 base::ThreadChecker thread_checker_; |
140 | 137 |
141 DISALLOW_COPY_AND_ASSIGN(BrowserCdmCastUi); | 138 DISALLOW_COPY_AND_ASSIGN(BrowserCdmCastUi); |
142 }; | 139 }; |
143 | 140 |
144 } // namespace media | 141 } // namespace media |
145 } // namespace chromecast | 142 } // namespace chromecast |
146 | 143 |
147 #endif // CHROMECAST_MEDIA_CDM_BROWSER_CDM_CAST_H_ | 144 #endif // CHROMECAST_MEDIA_CDM_BROWSER_CDM_CAST_H_ |
OLD | NEW |