Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: media/base/media_keys.h

Issue 1808983002: media: Add MediaDrmBridgeCdmContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 MEDIA_BASE_MEDIA_KEYS_H_ 5 #ifndef MEDIA_BASE_MEDIA_KEYS_H_
6 #define MEDIA_BASE_MEDIA_KEYS_H_ 6 #define MEDIA_BASE_MEDIA_KEYS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 // the session is closed. Once the session is closed, a SessionClosedCB must 137 // the session is closed. Once the session is closed, a SessionClosedCB must
138 // also be called. 138 // also be called.
139 virtual void CloseSession(const std::string& session_id, 139 virtual void CloseSession(const std::string& session_id,
140 scoped_ptr<SimpleCdmPromise> promise) = 0; 140 scoped_ptr<SimpleCdmPromise> promise) = 0;
141 141
142 // Removes stored session data associated with the session specified by 142 // Removes stored session data associated with the session specified by
143 // |session_id|. 143 // |session_id|.
144 virtual void RemoveSession(const std::string& session_id, 144 virtual void RemoveSession(const std::string& session_id,
145 scoped_ptr<SimpleCdmPromise> promise) = 0; 145 scoped_ptr<SimpleCdmPromise> promise) = 0;
146 146
147 // Returns the CdmContext associated with |this| if Decryptor or CDM ID is 147 // Returns the CdmContext associated with |this|. The returned CdmContext is
148 // supported. The returned CdmContext is owned by |this|. Caller needs to make 148 // owned by |this| and the caller needs to make sure it is not used after
149 // sure it is not used after |this| is destructed. 149 // |this| is destructed.
150 // Returns null if no Decryptor nor CDM ID is supported. Instead the media 150 // Returns null if CdmContext is not supported. Instead the media player may
151 // player may use the CDM via some platform specific method. 151 // use the CDM via some platform specific method.
152 // By default this method returns null. 152 // By default this method returns null.
153 // TODO(xhwang): Convert all SetCdm() implementations to use CdmContext so 153 // TODO(xhwang): Convert all SetCdm() implementations to use CdmContext so
154 // that this function should never return nullptr. 154 // that this function should never return nullptr.
155 virtual CdmContext* GetCdmContext(); 155 virtual CdmContext* GetCdmContext();
156 156
157 // Deletes |this| on the correct thread. By default |this| is deleted 157 // Deletes |this| on the correct thread. By default |this| is deleted
158 // immediately. Override this method if |this| needs to be deleted on a 158 // immediately. Override this method if |this| needs to be deleted on a
159 // specific thread. 159 // specific thread.
160 virtual void DeleteOnCorrectThread() const; 160 virtual void DeleteOnCorrectThread() const;
161 161
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 207
208 // Called when the CDM changes the expiration time of a session. 208 // Called when the CDM changes the expiration time of a session.
209 // See http://w3c.github.io/encrypted-media/#update-expiration 209 // See http://w3c.github.io/encrypted-media/#update-expiration
210 typedef base::Callback<void(const std::string& session_id, 210 typedef base::Callback<void(const std::string& session_id,
211 const base::Time& new_expiry_time)> 211 const base::Time& new_expiry_time)>
212 SessionExpirationUpdateCB; 212 SessionExpirationUpdateCB;
213 213
214 } // namespace media 214 } // namespace media
215 215
216 #endif // MEDIA_BASE_MEDIA_KEYS_H_ 216 #endif // MEDIA_BASE_MEDIA_KEYS_H_
OLDNEW
« media/base/cdm_context.h ('K') | « media/base/cdm_context.h ('k') | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698