| OLD | NEW |
| 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_BASE_CDM_CALLBACK_PROMISE_H_ | 5 #ifndef MEDIA_BASE_CDM_CALLBACK_PROMISE_H_ |
| 6 #define MEDIA_BASE_CDM_CALLBACK_PROMISE_H_ | 6 #define MEDIA_BASE_CDM_CALLBACK_PROMISE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "media/base/cdm_promise.h" | 14 #include "media/base/cdm_promise.h" |
| 15 // TODO(xhwang): Remove this include after http://crbug.com/656706 is fixed. |
| 16 #include "media/base/content_decryption_module.h" |
| 15 #include "media/base/media_export.h" | 17 #include "media/base/media_export.h" |
| 16 #include "media/base/media_keys.h" | |
| 17 | 18 |
| 18 namespace media { | 19 namespace media { |
| 19 | 20 |
| 20 typedef base::Callback<void(CdmPromise::Exception exception_code, | 21 typedef base::Callback<void(CdmPromise::Exception exception_code, |
| 21 uint32_t system_code, | 22 uint32_t system_code, |
| 22 const std::string& error_message)> | 23 const std::string& error_message)> |
| 23 PromiseRejectedCB; | 24 PromiseRejectedCB; |
| 24 | 25 |
| 25 template <typename... T> | 26 template <typename... T> |
| 26 class MEDIA_EXPORT CdmCallbackPromise : public CdmPromiseTemplate<T...> { | 27 class MEDIA_EXPORT CdmCallbackPromise : public CdmPromiseTemplate<T...> { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 42 | 43 |
| 43 base::Callback<void(const T&...)> resolve_cb_; | 44 base::Callback<void(const T&...)> resolve_cb_; |
| 44 PromiseRejectedCB reject_cb_; | 45 PromiseRejectedCB reject_cb_; |
| 45 | 46 |
| 46 DISALLOW_COPY_AND_ASSIGN(CdmCallbackPromise); | 47 DISALLOW_COPY_AND_ASSIGN(CdmCallbackPromise); |
| 47 }; | 48 }; |
| 48 | 49 |
| 49 } // namespace media | 50 } // namespace media |
| 50 | 51 |
| 51 #endif // MEDIA_BASE_CDM_CALLBACK_PROMISE_H_ | 52 #endif // MEDIA_BASE_CDM_CALLBACK_PROMISE_H_ |
| OLD | NEW |