| 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 13 matching lines...) Expand all Loading... |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef MediaKeySession_h | 26 #ifndef MediaKeySession_h |
| 27 #define MediaKeySession_h | 27 #define MediaKeySession_h |
| 28 | 28 |
| 29 #include "bindings/core/v8/ScriptPromiseProperty.h" | 29 #include "bindings/core/v8/ScriptPromiseProperty.h" |
| 30 #include "core/dom/ActiveDOMObject.h" | 30 #include "core/dom/ActiveDOMObject.h" |
| 31 #include "core/dom/DOMException.h" | 31 #include "core/dom/DOMException.h" |
| 32 #include "modules/EventTargetModules.h" | 32 #include "modules/EventTargetModules.h" |
| 33 #include "platform/Timer.h" | 33 #include "platform/Timer.h" |
| 34 #include "platform/heap/Handle.h" | |
| 35 #include "public/platform/WebContentDecryptionModuleSession.h" | 34 #include "public/platform/WebContentDecryptionModuleSession.h" |
| 36 #include "wtf/Forward.h" | |
| 37 | 35 |
| 38 namespace blink { | 36 namespace blink { |
| 39 | 37 |
| 40 class ScriptPromise; | 38 class ScriptPromise; |
| 41 class ScriptState; | 39 class ScriptState; |
| 42 class GenericEventQueue; | 40 class GenericEventQueue; |
| 43 class MediaKeyError; | 41 class MediaKeyError; |
| 44 class MediaKeys; | 42 class MediaKeys; |
| 45 class WebContentDecryptionModule; | |
| 46 class WebString; | 43 class WebString; |
| 47 | 44 |
| 48 // References are held by JS only. However, even if all JS references are | 45 // References are held by JS only. However, even if all JS references are |
| 49 // dropped, it won't be garbage collected until close event received or | 46 // dropped, it won't be garbage collected until close event received or |
| 50 // MediaKeys goes away (as determined by the validity of a WeakPtr). This allows | 47 // MediaKeys goes away (as determined by the validity of a WeakPtr). This allows |
| 51 // the CDM to continue to fire events for this session, as long as the session | 48 // the CDM to continue to fire events for this session, as long as the session |
| 52 // is open. | 49 // is open. |
| 53 // | 50 // |
| 54 // WeakPtr<MediaKeys> is used instead of having MediaKeys and MediaKeySession | 51 // WeakPtr<MediaKeys> is used instead of having MediaKeys and MediaKeySession |
| 55 // keep references to each other, and then having to inform the other object | 52 // keep references to each other, and then having to inform the other object |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 typedef ScriptPromiseProperty<Member<MediaKeySession>, V8UndefinedType, RefP
trWillBeMember<DOMException> > ClosedPromise; | 132 typedef ScriptPromiseProperty<Member<MediaKeySession>, V8UndefinedType, RefP
trWillBeMember<DOMException> > ClosedPromise; |
| 136 Member<ClosedPromise> m_closedPromise; | 133 Member<ClosedPromise> m_closedPromise; |
| 137 | 134 |
| 138 HeapDeque<Member<PendingAction> > m_pendingActions; | 135 HeapDeque<Member<PendingAction> > m_pendingActions; |
| 139 Timer<MediaKeySession> m_actionTimer; | 136 Timer<MediaKeySession> m_actionTimer; |
| 140 }; | 137 }; |
| 141 | 138 |
| 142 } // namespace blink | 139 } // namespace blink |
| 143 | 140 |
| 144 #endif // MediaKeySession_h | 141 #endif // MediaKeySession_h |
| OLD | NEW |