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

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

Issue 2411573002: media: Use new wrapper types for media mojo interfaces (Closed)
Patch Set: comments addressed Created 4 years, 2 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
« no previous file with comments | « content/browser/media/android/provision_fetcher_impl.cc ('k') | media/mojo/clients/mojo_cdm.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <memory> 10 #include <memory>
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // which must be AFTER the |promise| is resolved. Otherwise, the session ID 114 // which must be AFTER the |promise| is resolved. Otherwise, the session ID
115 // in the callback will not be recognized. 115 // in the callback will not be recognized.
116 // 3. UpdateSession(), CloseSession() and RemoveSession() should only be 116 // 3. UpdateSession(), CloseSession() and RemoveSession() should only be
117 // called after the |promise| is resolved. 117 // called after the |promise| is resolved.
118 virtual void CreateSessionAndGenerateRequest( 118 virtual void CreateSessionAndGenerateRequest(
119 SessionType session_type, 119 SessionType session_type,
120 EmeInitDataType init_data_type, 120 EmeInitDataType init_data_type,
121 const std::vector<uint8_t>& init_data, 121 const std::vector<uint8_t>& init_data,
122 std::unique_ptr<NewSessionCdmPromise> promise) = 0; 122 std::unique_ptr<NewSessionCdmPromise> promise) = 0;
123 123
124 // Loads a session with the |session_id| provided. 124 // Loads a session with the |session_id| provided. Resolves the |promise| with
125 // |session_id| if the session is successfully loaded. Resolves the |promise|
126 // with an empty session ID if the session cannot be found. Rejects the
127 // |promise| if session loading is not supported, or other unexpected failure
128 // happened.
125 // Note: UpdateSession(), CloseSession() and RemoveSession() should only be 129 // Note: UpdateSession(), CloseSession() and RemoveSession() should only be
126 // called after the |promise| is resolved. 130 // called after the |promise| is resolved.
127 virtual void LoadSession(SessionType session_type, 131 virtual void LoadSession(SessionType session_type,
128 const std::string& session_id, 132 const std::string& session_id,
129 std::unique_ptr<NewSessionCdmPromise> promise) = 0; 133 std::unique_ptr<NewSessionCdmPromise> promise) = 0;
130 134
131 // Updates a session specified by |session_id| with |response|. 135 // Updates a session specified by |session_id| with |response|.
132 virtual void UpdateSession(const std::string& session_id, 136 virtual void UpdateSession(const std::string& session_id,
133 const std::vector<uint8_t>& response, 137 const std::vector<uint8_t>& response,
134 std::unique_ptr<SimpleCdmPromise> promise) = 0; 138 std::unique_ptr<SimpleCdmPromise> promise) = 0;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 202
199 // Called when the CDM changes the expiration time of a session. 203 // Called when the CDM changes the expiration time of a session.
200 // See http://w3c.github.io/encrypted-media/#update-expiration 204 // See http://w3c.github.io/encrypted-media/#update-expiration
201 typedef base::Callback<void(const std::string& session_id, 205 typedef base::Callback<void(const std::string& session_id,
202 const base::Time& new_expiry_time)> 206 const base::Time& new_expiry_time)>
203 SessionExpirationUpdateCB; 207 SessionExpirationUpdateCB;
204 208
205 } // namespace media 209 } // namespace media
206 210
207 #endif // MEDIA_BASE_MEDIA_KEYS_H_ 211 #endif // MEDIA_BASE_MEDIA_KEYS_H_
OLDNEW
« no previous file with comments | « content/browser/media/android/provision_fetcher_impl.cc ('k') | media/mojo/clients/mojo_cdm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698