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

Side by Side Diff: media/mojo/clients/mojo_cdm.h

Issue 2268283003: media: Add External Clear Key content browser test on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 3 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 | « media/base/key_systems.cc ('k') | media/mojo/clients/mojo_cdm.cc » ('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 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_MOJO_CLIENTS_MOJO_CDM_H_ 5 #ifndef MEDIA_MOJO_CLIENTS_MOJO_CDM_H_
6 #define MEDIA_MOJO_CLIENTS_MOJO_CDM_H_ 6 #define MEDIA_MOJO_CLIENTS_MOJO_CDM_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 // Protects |cdm_id_|, |decryptor_ptr_|, |decryptor_| and 134 // Protects |cdm_id_|, |decryptor_ptr_|, |decryptor_| and
135 // |decryptor_task_runner_| which could be accessed from other threads. 135 // |decryptor_task_runner_| which could be accessed from other threads.
136 // See CdmContext implementation above. 136 // See CdmContext implementation above.
137 mutable base::Lock lock_; 137 mutable base::Lock lock_;
138 138
139 // CDM ID of the remote CDM. Set after initialization is completed. Must not 139 // CDM ID of the remote CDM. Set after initialization is completed. Must not
140 // be invalid if initialization succeeded. 140 // be invalid if initialization succeeded.
141 int cdm_id_; 141 int cdm_id_;
142 142
143 // The DecryptorPtr exposed by the remote CDM. Set after initialization is 143 // The DecryptorPtrInfo exposed by the remote CDM. Set after initialization
144 // completed and cleared after |decryptor_| is created. May be null after 144 // is completed and cleared after |decryptor_| is created. May be invalid
145 // initialization if the CDM doesn't support a Decryptor. 145 // after initialization if the CDM doesn't support a Decryptor.
146 mojom::DecryptorPtr decryptor_ptr_; 146 mojom::DecryptorPtrInfo decryptor_ptr_info_;
147 147
148 // Decryptor based on |decryptor_ptr_|, lazily created in GetDecryptor(). 148 // Decryptor based on |decryptor_ptr_|, lazily created in GetDecryptor().
149 // Since GetDecryptor() can be called on a different thread, use 149 // Since GetDecryptor() can be called on a different thread, use
150 // |decryptor_task_runner_| to bind |decryptor_| to that thread. 150 // |decryptor_task_runner_| to bind |decryptor_| to that thread.
151 std::unique_ptr<MojoDecryptor> decryptor_; 151 std::unique_ptr<MojoDecryptor> decryptor_;
152 scoped_refptr<base::SingleThreadTaskRunner> decryptor_task_runner_; 152 scoped_refptr<base::SingleThreadTaskRunner> decryptor_task_runner_;
153 153
154 // Callbacks for firing session events. 154 // Callbacks for firing session events.
155 SessionMessageCB session_message_cb_; 155 SessionMessageCB session_message_cb_;
156 SessionClosedCB session_closed_cb_; 156 SessionClosedCB session_closed_cb_;
157 SessionKeysChangeCB session_keys_change_cb_; 157 SessionKeysChangeCB session_keys_change_cb_;
158 SessionExpirationUpdateCB session_expiration_update_cb_; 158 SessionExpirationUpdateCB session_expiration_update_cb_;
159 159
160 // Pending promise for InitializeCdm(). 160 // Pending promise for InitializeCdm().
161 std::unique_ptr<CdmInitializedPromise> pending_init_promise_; 161 std::unique_ptr<CdmInitializedPromise> pending_init_promise_;
162 162
163 // This must be the last member. 163 // This must be the last member.
164 base::WeakPtrFactory<MojoCdm> weak_factory_; 164 base::WeakPtrFactory<MojoCdm> weak_factory_;
165 165
166 DISALLOW_COPY_AND_ASSIGN(MojoCdm); 166 DISALLOW_COPY_AND_ASSIGN(MojoCdm);
167 }; 167 };
168 168
169 } // namespace media 169 } // namespace media
170 170
171 #endif // MEDIA_MOJO_CLIENTS_MOJO_CDM_H_ 171 #endif // MEDIA_MOJO_CLIENTS_MOJO_CDM_H_
OLDNEW
« no previous file with comments | « media/base/key_systems.cc ('k') | media/mojo/clients/mojo_cdm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698