Index: media/base/cdm_promise.h |
diff --git a/media/base/cdm_promise.h b/media/base/cdm_promise.h |
index dc11e7a01442b4be675375a2132937e724cbb526..1bb5549f27f68d2b5f07147af4bd5a2982d62785 100644 |
--- a/media/base/cdm_promise.h |
+++ b/media/base/cdm_promise.h |
@@ -12,7 +12,6 @@ |
#include "base/logging.h" |
#include "base/macros.h" |
#include "media/base/media_export.h" |
-#include "media/base/media_keys.h" |
namespace media { |
@@ -32,6 +31,19 @@ namespace media { |
// the pepper interface. |
class MEDIA_EXPORT CdmPromise { |
public: |
+ // TODO(jrummell): Remove deprecated errors. See |
+ // http://crbug.com/570216 |
+ enum Exception { |
+ NOT_SUPPORTED_ERROR, |
+ INVALID_STATE_ERROR, |
+ INVALID_ACCESS_ERROR, |
+ QUOTA_EXCEEDED_ERROR, |
+ UNKNOWN_ERROR, |
+ CLIENT_ERROR, |
+ OUTPUT_ERROR, |
+ EXCEPTION_MAX = OUTPUT_ERROR |
+ }; |
+ |
enum ResolveParameterType { |
VOID_TYPE, |
INT_TYPE, |
@@ -46,7 +58,7 @@ class MEDIA_EXPORT CdmPromise { |
// specified. |system_code| is a Key System-specific value for the error |
// that occurred, or 0 if there is no associated status code or such status |
// codes are not supported by the Key System. |error_message| is optional. |
- virtual void reject(MediaKeys::Exception exception_code, |
+ virtual void reject(CdmPromise::Exception exception_code, |
xhwang
2016/10/26 00:13:04
nit: No need for "CdmPromise::" here.
|
uint32_t system_code, |
const std::string& error_message) = 0; |
@@ -90,7 +102,7 @@ class MEDIA_EXPORT CdmPromiseTemplate : public CdmPromise { |
virtual void resolve(const T&... result) = 0; |
// CdmPromise implementation. |
- virtual void reject(MediaKeys::Exception exception_code, |
+ virtual void reject(CdmPromise::Exception exception_code, |
xhwang
2016/10/26 00:13:05
ditto
|
uint32_t system_code, |
const std::string& error_message) = 0; |
@@ -116,7 +128,7 @@ class MEDIA_EXPORT CdmPromiseTemplate : public CdmPromise { |
std::string message = |
"Unfulfilled promise rejected automatically during destruction."; |
DVLOG(1) << message; |
- reject(MediaKeys::INVALID_STATE_ERROR, 0, message); |
+ reject(CdmPromise::INVALID_STATE_ERROR, 0, message); |
xhwang
2016/10/26 00:13:04
ditto
|
DCHECK(is_settled_); |
} |