Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 CdmContext; | 23 class CdmContext; |
| 24 class CdmKeyInformation; | |
| 24 | 25 |
| 25 template <typename... T> | 26 template <typename... T> |
| 26 class CdmPromiseTemplate; | 27 class CdmPromiseTemplate; |
| 27 | 28 |
| 28 typedef CdmPromiseTemplate<std::string> NewSessionCdmPromise; | 29 typedef CdmPromiseTemplate<std::string> NewSessionCdmPromise; |
| 29 typedef CdmPromiseTemplate<> SimpleCdmPromise; | 30 typedef CdmPromiseTemplate<> SimpleCdmPromise; |
| 31 typedef std::vector<CdmKeyInformation> CdmKeyInformationVector; | |
|
xhwang
2015/01/02 21:55:07
Throughout this CL, how about
s/CdmKeyInformationV
xhwang
2015/01/02 21:55:07
Is it worth using ScopedVector here? If not, add a
jrummell
2015/01/05 22:17:59
Done.
jrummell
2015/01/05 22:17:59
Done.
| |
| 30 | 32 |
| 31 // Performs media key operations. | 33 // Performs media key operations. |
| 32 // | 34 // |
| 33 // 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 |
| 34 // should be fast and nonblocking; key events should be fired asynchronously. | 36 // should be fast and nonblocking; key events should be fired asynchronously. |
| 35 class MEDIA_EXPORT MediaKeys{ | 37 class MEDIA_EXPORT MediaKeys{ |
| 36 public: | 38 public: |
| 37 // Reported to UMA, so never reuse a value! | 39 // Reported to UMA, so never reuse a value! |
| 38 // Must be kept in sync with blink::WebMediaPlayerClient::MediaKeyErrorCode | 40 // Must be kept in sync with blink::WebMediaPlayerClient::MediaKeyErrorCode |
| 39 // (enforced in webmediaplayer_impl.cc). | 41 // (enforced in webmediaplayer_impl.cc). |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 129 const GURL& destination_url)> SessionMessageCB; | 131 const GURL& destination_url)> SessionMessageCB; |
| 130 | 132 |
| 131 typedef base::Callback<void(const std::string& web_session_id)> SessionClosedCB; | 133 typedef base::Callback<void(const std::string& web_session_id)> SessionClosedCB; |
| 132 | 134 |
| 133 typedef base::Callback<void(const std::string& web_session_id, | 135 typedef base::Callback<void(const std::string& web_session_id, |
| 134 MediaKeys::Exception exception_code, | 136 MediaKeys::Exception exception_code, |
| 135 uint32 system_code, | 137 uint32 system_code, |
| 136 const std::string& error_message)> SessionErrorCB; | 138 const std::string& error_message)> SessionErrorCB; |
| 137 | 139 |
| 138 typedef base::Callback<void(const std::string& web_session_id, | 140 typedef base::Callback<void(const std::string& web_session_id, |
| 139 bool has_additional_usable_key)> | 141 bool has_additional_usable_key, |
| 142 const CdmKeyInformationVector& key_information)> | |
| 140 SessionKeysChangeCB; | 143 SessionKeysChangeCB; |
| 141 | 144 |
| 142 typedef base::Callback<void(const std::string& web_session_id, | 145 typedef base::Callback<void(const std::string& web_session_id, |
| 143 const base::Time& new_expiry_time)> | 146 const base::Time& new_expiry_time)> |
| 144 SessionExpirationUpdateCB; | 147 SessionExpirationUpdateCB; |
| 145 | 148 |
| 146 } // namespace media | 149 } // namespace media |
| 147 | 150 |
| 148 #endif // MEDIA_BASE_MEDIA_KEYS_H_ | 151 #endif // MEDIA_BASE_MEDIA_KEYS_H_ |
| OLD | NEW |