Chromium Code Reviews| Index: media/base/cdm_promise.h |
| diff --git a/media/base/cdm_promise.h b/media/base/cdm_promise.h |
| index 14f79f852d149a4a80471e823c873508ec10d8fc..049ba48369c7cde10888c645a7a495fce3622561 100644 |
| --- a/media/base/cdm_promise.h |
| +++ b/media/base/cdm_promise.h |
| @@ -35,6 +35,13 @@ class MEDIA_EXPORT CdmPromise { |
| NUM_RESULT_CODES |
| }; |
| + enum PromiseType { |
| + UNKNOWN_TYPE, |
| + SIMPLE_TYPE, |
| + NEW_SESSION_TYPE, |
| + KEY_IDS_TYPE |
| + }; |
| + |
| typedef base::Callback<void(MediaKeys::Exception exception_code, |
| uint32 system_code, |
| const std::string& error_message)> |
| @@ -50,6 +57,8 @@ class MEDIA_EXPORT CdmPromise { |
| uint32 system_code, |
| const std::string& error_message); |
| + virtual PromiseType Type(); |
|
ddorwin
2014/08/25 22:55:01
Since this is a getter, it should be type().
Also,
jrummell
2014/08/26 00:19:23
Done.
|
| + |
| protected: |
| CdmPromise(); |
| CdmPromise(PromiseRejectedCB reject_cb); |
| @@ -80,6 +89,7 @@ class MEDIA_EXPORT CdmPromiseTemplate : public CdmPromise { |
| const std::string& uma_name); |
| virtual ~CdmPromiseTemplate(); |
| virtual void resolve(const T& result); |
|
ddorwin
2014/08/25 22:55:01
Not now, but this should be _R_esolve.
jrummell
2014/08/26 00:19:23
Acknowledged.
|
| + virtual PromiseType Type(); |
|
ddorwin
2014/08/25 22:55:01
Do we need this and l60? Would it be better to ini
jrummell
2014/08/26 00:19:23
Since this is a template, I can't find any easy wa
|
| protected: |
| // Allow subclasses to completely override the implementation. |
| @@ -104,6 +114,7 @@ class MEDIA_EXPORT CdmPromiseTemplate<void> : public CdmPromise { |
| const std::string& uma_name); |
| virtual ~CdmPromiseTemplate(); |
| virtual void resolve(); |
| + virtual PromiseType Type(); |
|
ddorwin
2014/08/25 22:55:01
ditto
jrummell
2014/08/26 00:19:23
Acknowledged.
|
| protected: |
| // Allow subclasses to completely override the implementation. |