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

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

Issue 604283003: Refactor CdmPromise and related classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase + override Created 6 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 | « media/base/cdm_promise.cc ('k') | media/cdm/aes_decryptor_unittest.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 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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "media/base/media_export.h" 14 #include "media/base/media_export.h"
15 #include "url/gurl.h" 15 #include "url/gurl.h"
16 16
17 namespace base { 17 namespace base {
18 class Time; 18 class Time;
19 } 19 }
20 20
21 namespace media { 21 namespace media {
22 22
23 class Decryptor; 23 class Decryptor;
24 24
25 template <typename T> 25 template <typename... T>
26 class CdmPromiseTemplate; 26 class CdmPromiseTemplate;
27 27
28 typedef CdmPromiseTemplate<std::string> NewSessionCdmPromise; 28 typedef CdmPromiseTemplate<std::string> NewSessionCdmPromise;
29 typedef CdmPromiseTemplate<void> SimpleCdmPromise; 29 typedef CdmPromiseTemplate<> SimpleCdmPromise;
30 typedef std::vector<std::vector<uint8> > KeyIdsVector; 30 typedef std::vector<std::vector<uint8> > KeyIdsVector;
31 typedef CdmPromiseTemplate<KeyIdsVector> KeyIdsPromise; 31 typedef CdmPromiseTemplate<KeyIdsVector> KeyIdsPromise;
32 32
33 // Performs media key operations. 33 // Performs media key operations.
34 // 34 //
35 // All key operations are called on the renderer thread. Therefore, these calls 35 // All key operations are called on the renderer thread. Therefore, these calls
36 // should be fast and nonblocking; key events should be fired asynchronously. 36 // should be fast and nonblocking; key events should be fired asynchronously.
37 class MEDIA_EXPORT MediaKeys { 37 class MEDIA_EXPORT MediaKeys {
38 public: 38 public:
39 // Reported to UMA, so never reuse a value! 39 // Reported to UMA, so never reuse a value!
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 bool has_additional_usable_key)> 146 bool has_additional_usable_key)>
147 SessionKeysChangeCB; 147 SessionKeysChangeCB;
148 148
149 typedef base::Callback<void(const std::string& web_session_id, 149 typedef base::Callback<void(const std::string& web_session_id,
150 const base::Time& new_expiry_time)> 150 const base::Time& new_expiry_time)>
151 SessionExpirationUpdateCB; 151 SessionExpirationUpdateCB;
152 152
153 } // namespace media 153 } // namespace media
154 154
155 #endif // MEDIA_BASE_MEDIA_KEYS_H_ 155 #endif // MEDIA_BASE_MEDIA_KEYS_H_
OLDNEW
« no previous file with comments | « media/base/cdm_promise.cc ('k') | media/cdm/aes_decryptor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698