| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // object will be finalized and the WeakMember<> references will be cleared | 55 // object will be finalized and the WeakMember<> references will be cleared |
| 56 // out(zeroed) by the garbage collector. | 56 // out(zeroed) by the garbage collector. |
| 57 // | 57 // |
| 58 // Because this object controls the lifetime of the WebContentDecryptionModuleSe
ssion, | 58 // Because this object controls the lifetime of the WebContentDecryptionModuleSe
ssion, |
| 59 // it may outlive any JavaScript references as long as the MediaKeys object is a
live. | 59 // it may outlive any JavaScript references as long as the MediaKeys object is a
live. |
| 60 // The WebContentDecryptionModuleSession has the same lifetime as this object. | 60 // The WebContentDecryptionModuleSession has the same lifetime as this object. |
| 61 class MediaKeySession final | 61 class MediaKeySession final |
| 62 : public RefCountedGarbageCollectedEventTargetWithInlineData<MediaKeySession
> | 62 : public RefCountedGarbageCollectedEventTargetWithInlineData<MediaKeySession
> |
| 63 , public ActiveDOMObject | 63 , public ActiveDOMObject |
| 64 , private WebContentDecryptionModuleSession::Client { | 64 , private WebContentDecryptionModuleSession::Client { |
| 65 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<M
ediaKeySession>); | 65 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(MediaKeySession); |
| 66 DEFINE_WRAPPERTYPEINFO(); | 66 DEFINE_WRAPPERTYPEINFO(); |
| 67 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MediaKeySession); | 67 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MediaKeySession); |
| 68 public: | 68 public: |
| 69 static MediaKeySession* create(ScriptState*, MediaKeys*, WebEncryptedMediaSe
ssionType); | 69 static MediaKeySession* create(ScriptState*, MediaKeys*, WebEncryptedMediaSe
ssionType); |
| 70 virtual ~MediaKeySession(); | 70 virtual ~MediaKeySession(); |
| 71 | 71 |
| 72 String sessionId() const; | 72 String sessionId() const; |
| 73 double expiration() const { return m_expiration; } | 73 double expiration() const { return m_expiration; } |
| 74 ScriptPromise closed(ScriptState*); | 74 ScriptPromise closed(ScriptState*); |
| 75 MediaKeyStatusMap* keyStatuses(); | 75 MediaKeyStatusMap* keyStatuses(); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 typedef ScriptPromiseProperty<Member<MediaKeySession>, ToV8UndefinedGenerato
r, Member<DOMException>> ClosedPromise; | 135 typedef ScriptPromiseProperty<Member<MediaKeySession>, ToV8UndefinedGenerato
r, Member<DOMException>> ClosedPromise; |
| 136 Member<ClosedPromise> m_closedPromise; | 136 Member<ClosedPromise> m_closedPromise; |
| 137 | 137 |
| 138 HeapDeque<Member<PendingAction>> m_pendingActions; | 138 HeapDeque<Member<PendingAction>> m_pendingActions; |
| 139 Timer<MediaKeySession> m_actionTimer; | 139 Timer<MediaKeySession> m_actionTimer; |
| 140 }; | 140 }; |
| 141 | 141 |
| 142 } // namespace blink | 142 } // namespace blink |
| 143 | 143 |
| 144 #endif // MediaKeySession_h | 144 #endif // MediaKeySession_h |
| OLD | NEW |