OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 2013 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 , private WebContentDecryptionModuleSession::Client { | 63 , private WebContentDecryptionModuleSession::Client { |
64 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<M
ediaKeySession>); | 64 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<M
ediaKeySession>); |
65 DEFINE_WRAPPERTYPEINFO(); | 65 DEFINE_WRAPPERTYPEINFO(); |
66 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MediaKeySession); | 66 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MediaKeySession); |
67 public: | 67 public: |
68 static MediaKeySession* create(ScriptState*, MediaKeys*, const String& sessi
onType); | 68 static MediaKeySession* create(ScriptState*, MediaKeys*, const String& sessi
onType); |
69 virtual ~MediaKeySession(); | 69 virtual ~MediaKeySession(); |
70 | 70 |
71 const String& keySystem() const { return m_keySystem; } | 71 const String& keySystem() const { return m_keySystem; } |
72 String sessionId() const; | 72 String sessionId() const; |
| 73 double expiration() const { return m_expiration; } |
73 ScriptPromise closed(ScriptState*); | 74 ScriptPromise closed(ScriptState*); |
74 | 75 |
75 ScriptPromise generateRequest(ScriptState*, const String& initDataType, Arra
yBuffer* initData); | 76 ScriptPromise generateRequest(ScriptState*, const String& initDataType, Arra
yBuffer* initData); |
76 ScriptPromise generateRequest(ScriptState*, const String& initDataType, Arra
yBufferView* initData); | 77 ScriptPromise generateRequest(ScriptState*, const String& initDataType, Arra
yBufferView* initData); |
77 | 78 |
78 void setError(MediaKeyError*); | 79 void setError(MediaKeyError*); |
79 MediaKeyError* error() { return m_error.get(); } | 80 MediaKeyError* error() { return m_error.get(); } |
80 | 81 |
81 ScriptPromise update(ScriptState*, ArrayBuffer* response); | 82 ScriptPromise update(ScriptState*, ArrayBuffer* response); |
82 ScriptPromise update(ScriptState*, ArrayBufferView* response); | 83 ScriptPromise update(ScriptState*, ArrayBufferView* response); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 String m_keySystem; | 120 String m_keySystem; |
120 RefPtrWillBeMember<MediaKeyError> m_error; | 121 RefPtrWillBeMember<MediaKeyError> m_error; |
121 OwnPtrWillBeMember<GenericEventQueue> m_asyncEventQueue; | 122 OwnPtrWillBeMember<GenericEventQueue> m_asyncEventQueue; |
122 OwnPtr<WebContentDecryptionModuleSession> m_session; | 123 OwnPtr<WebContentDecryptionModuleSession> m_session; |
123 | 124 |
124 // Used to determine if MediaKeys is still active. | 125 // Used to determine if MediaKeys is still active. |
125 WeakMember<MediaKeys> m_mediaKeys; | 126 WeakMember<MediaKeys> m_mediaKeys; |
126 | 127 |
127 // Session properties. | 128 // Session properties. |
128 String m_sessionType; | 129 String m_sessionType; |
| 130 double m_expiration; |
129 | 131 |
130 // Session states. | 132 // Session states. |
131 bool m_isUninitialized; | 133 bool m_isUninitialized; |
132 bool m_isCallable; | 134 bool m_isCallable; |
133 bool m_isClosed; // Is the CDM finished with this session? | 135 bool m_isClosed; // Is the CDM finished with this session? |
134 | 136 |
135 // Keep track of the closed promise. | 137 // Keep track of the closed promise. |
136 typedef ScriptPromiseProperty<Member<MediaKeySession>, V8UndefinedType, RefP
trWillBeMember<DOMException> > ClosedPromise; | 138 typedef ScriptPromiseProperty<Member<MediaKeySession>, V8UndefinedType, RefP
trWillBeMember<DOMException> > ClosedPromise; |
137 Member<ClosedPromise> m_closedPromise; | 139 Member<ClosedPromise> m_closedPromise; |
138 | 140 |
139 HeapDeque<Member<PendingAction> > m_pendingActions; | 141 HeapDeque<Member<PendingAction> > m_pendingActions; |
140 Timer<MediaKeySession> m_actionTimer; | 142 Timer<MediaKeySession> m_actionTimer; |
141 }; | 143 }; |
142 | 144 |
143 } // namespace blink | 145 } // namespace blink |
144 | 146 |
145 #endif // MediaKeySession_h | 147 #endif // MediaKeySession_h |
OLD | NEW |