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

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

Issue 567123002: Cleanup template in CdmPromise (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
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 media { 17 namespace media {
18 18
19 class Decryptor; 19 class Decryptor;
20 20 class KeyIdsPromise;
21 template <typename T> 21 class NewSessionCdmPromise;
22 class CdmPromiseTemplate; 22 class SimpleCdmPromise;
23
24 typedef CdmPromiseTemplate<std::string> NewSessionCdmPromise;
25 typedef CdmPromiseTemplate<void> SimpleCdmPromise;
26 typedef std::vector<std::vector<uint8> > KeyIdsVector;
27 typedef CdmPromiseTemplate<KeyIdsVector> KeyIdsPromise;
28 23
29 // Performs media key operations. 24 // Performs media key operations.
30 // 25 //
31 // All key operations are called on the renderer thread. Therefore, these calls 26 // All key operations are called on the renderer thread. Therefore, these calls
32 // should be fast and nonblocking; key events should be fired asynchronously. 27 // should be fast and nonblocking; key events should be fired asynchronously.
33 class MEDIA_EXPORT MediaKeys { 28 class MEDIA_EXPORT MediaKeys {
34 public: 29 public:
35 // Reported to UMA, so never reuse a value! 30 // Reported to UMA, so never reuse a value!
36 // Must be kept in sync with blink::WebMediaPlayerClient::MediaKeyErrorCode 31 // Must be kept in sync with blink::WebMediaPlayerClient::MediaKeyErrorCode
37 // (enforced in webmediaplayer_impl.cc). 32 // (enforced in webmediaplayer_impl.cc).
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 typedef base::Callback<void(const std::string& web_session_id)> SessionClosedCB; 113 typedef base::Callback<void(const std::string& web_session_id)> SessionClosedCB;
119 114
120 typedef base::Callback<void(const std::string& web_session_id, 115 typedef base::Callback<void(const std::string& web_session_id,
121 MediaKeys::Exception exception_code, 116 MediaKeys::Exception exception_code,
122 uint32 system_code, 117 uint32 system_code,
123 const std::string& error_message)> SessionErrorCB; 118 const std::string& error_message)> SessionErrorCB;
124 119
125 } // namespace media 120 } // namespace media
126 121
127 #endif // MEDIA_BASE_MEDIA_KEYS_H_ 122 #endif // MEDIA_BASE_MEDIA_KEYS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698