Index: media/base/media_keys.h |
diff --git a/media/base/media_keys.h b/media/base/media_keys.h |
index 50b76ce2981909233e309dedced7ff847b3696ca..c64c99863146e0c9c9b611d507bcf07418039144 100644 |
--- a/media/base/media_keys.h |
+++ b/media/base/media_keys.h |
@@ -61,7 +61,8 @@ class MEDIA_EXPORT MediaKeys{ |
QUOTA_EXCEEDED_ERROR, |
UNKNOWN_ERROR, |
CLIENT_ERROR, |
- OUTPUT_ERROR |
+ OUTPUT_ERROR, |
ddorwin
2015/01/14 23:09:21
The name "exception" and inclusion of "output" is
xhwang
2015/01/15 08:13:13
Acknowledged.
|
+ EXCEPTION_MAX = OUTPUT_ERROR |
ddorwin
2015/01/14 23:09:21
This is painful to maintain. :(
We had a conversat
xhwang
2015/01/15 08:13:13
Agreed this is ugly. It seems most enums used in I
|
}; |
// Type of license required when creating/loading a session. |
@@ -81,10 +82,15 @@ class MEDIA_EXPORT MediaKeys{ |
int certificate_data_length, |
scoped_ptr<SimpleCdmPromise> promise) = 0; |
- // Creates a session with the |init_data_type|, |init_data| and |session_type| |
- // provided. |
- // Note: UpdateSession() and ReleaseSession() should only be called after |
- // |promise| is resolved. |
+ // Creates a session with |session_type|. Then generates a request with the |
+ // |init_data_type| and |init_data|. |
+ // Note: |
+ // 1. The session ID will be provided when the |promise| is resolved. |
+ // 2. The generated request should be returned through a SessionMessageCB, |
+ // which must be AFTER the |promise| is resolved. Otherwise, the session ID |
+ // in the callback will not be recognized. |
+ // 3. UpdateSession(), CloseSession() and RemoveSession() should only be |
+ // called after the |promise| is resolved. |
virtual void CreateSessionAndGenerateRequest( |
SessionType session_type, |
const std::string& init_data_type, |
@@ -93,8 +99,8 @@ class MEDIA_EXPORT MediaKeys{ |
scoped_ptr<NewSessionCdmPromise> promise) = 0; |
// Loads a session with the |web_session_id| provided. |
- // Note: UpdateSession() and ReleaseSession() should only be called after |
- // |promise| is resolved. |
+ // Note: UpdateSession(), CloseSession() and RemoveSession() should only be |
+ // called after the |promise| is resolved. |
virtual void LoadSession(SessionType session_type, |
const std::string& web_session_id, |
scoped_ptr<NewSessionCdmPromise> promise) = 0; |
@@ -135,7 +141,7 @@ typedef base::Callback<void(const std::string& web_session_id, |
typedef base::Callback<void(const std::string& web_session_id)> SessionClosedCB; |
typedef base::Callback<void(const std::string& web_session_id, |
- MediaKeys::Exception exception_code, |
+ MediaKeys::Exception exception, |
uint32 system_code, |
const std::string& error_message)> SessionErrorCB; |