| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 // keep references to each other, and then having to inform the other object | 53 // keep references to each other, and then having to inform the other object |
| 54 // when it gets destroyed. When the Oilpan garbage collector determines that | 54 // when it gets destroyed. When the Oilpan garbage collector determines that |
| 55 // only WeakMember<> references remain to the MediaKeys object, the MediaKeys | 55 // only WeakMember<> references remain to the MediaKeys object, the MediaKeys |
| 56 // object will be finalized and the WeakMember<> references will be cleared | 56 // object will be finalized and the WeakMember<> references will be cleared |
| 57 // out(zeroed) by the garbage collector. | 57 // out(zeroed) by the garbage collector. |
| 58 // | 58 // |
| 59 // Because this object controls the lifetime of the WebContentDecryptionModuleSe
ssion, | 59 // Because this object controls the lifetime of the WebContentDecryptionModuleSe
ssion, |
| 60 // it may outlive any JavaScript references as long as the MediaKeys object is a
live. | 60 // it may outlive any JavaScript references as long as the MediaKeys object is a
live. |
| 61 // The WebContentDecryptionModuleSession has the same lifetime as this object. | 61 // The WebContentDecryptionModuleSession has the same lifetime as this object. |
| 62 class MediaKeySession final | 62 class MediaKeySession final |
| 63 : public RefCountedGarbageCollectedEventTargetWithInlineData<MediaKeySession
> | 63 : public EventTargetWithInlineData |
| 64 , public ActiveScriptWrappable | 64 , public ActiveScriptWrappable |
| 65 , public ActiveDOMObject | 65 , public ActiveDOMObject |
| 66 , private WebContentDecryptionModuleSession::Client { | 66 , private WebContentDecryptionModuleSession::Client { |
| 67 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(MediaKeySession); | 67 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(MediaKeySession); |
| 68 DEFINE_WRAPPERTYPEINFO(); | 68 DEFINE_WRAPPERTYPEINFO(); |
| 69 USING_GARBAGE_COLLECTED_MIXIN(MediaKeySession); | 69 USING_GARBAGE_COLLECTED_MIXIN(MediaKeySession); |
| 70 USING_PRE_FINALIZER(MediaKeySession, dispose); | 70 USING_PRE_FINALIZER(MediaKeySession, dispose); |
| 71 public: | 71 public: |
| 72 static MediaKeySession* create(ScriptState*, MediaKeys*, WebEncryptedMediaSe
ssionType); | 72 static MediaKeySession* create(ScriptState*, MediaKeys*, WebEncryptedMediaSe
ssionType); |
| 73 ~MediaKeySession() override; | 73 ~MediaKeySession() override; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 typedef ScriptPromiseProperty<Member<MediaKeySession>, ToV8UndefinedGenerato
r, Member<DOMException>> ClosedPromise; | 138 typedef ScriptPromiseProperty<Member<MediaKeySession>, ToV8UndefinedGenerato
r, Member<DOMException>> ClosedPromise; |
| 139 Member<ClosedPromise> m_closedPromise; | 139 Member<ClosedPromise> m_closedPromise; |
| 140 | 140 |
| 141 HeapDeque<Member<PendingAction>> m_pendingActions; | 141 HeapDeque<Member<PendingAction>> m_pendingActions; |
| 142 Timer<MediaKeySession> m_actionTimer; | 142 Timer<MediaKeySession> m_actionTimer; |
| 143 }; | 143 }; |
| 144 | 144 |
| 145 } // namespace blink | 145 } // namespace blink |
| 146 | 146 |
| 147 #endif // MediaKeySession_h | 147 #endif // MediaKeySession_h |
| OLD | NEW |