| 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 class MediaKeySession final | 63 class MediaKeySession final |
| 64 : public EventTargetWithInlineData | 64 : public EventTargetWithInlineData |
| 65 , public ActiveScriptWrappable | 65 , public ActiveScriptWrappable |
| 66 , public ActiveDOMObject | 66 , public ActiveDOMObject |
| 67 , private WebContentDecryptionModuleSession::Client { | 67 , private WebContentDecryptionModuleSession::Client { |
| 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 |
| 73 ~MediaKeySession() override; | 74 ~MediaKeySession() override; |
| 74 | 75 |
| 75 String sessionId() const; | 76 String sessionId() const; |
| 76 double expiration() const { return m_expiration; } | 77 double expiration() const { return m_expiration; } |
| 77 ScriptPromise closed(ScriptState*); | 78 ScriptPromise closed(ScriptState*); |
| 78 MediaKeyStatusMap* keyStatuses(); | 79 MediaKeyStatusMap* keyStatuses(); |
| 80 DEFINE_ATTRIBUTE_EVENT_LISTENER(keystatuseschange); |
| 81 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); |
| 79 | 82 |
| 80 ScriptPromise generateRequest(ScriptState*, const String& initDataType, cons
t DOMArrayPiece& initData); | 83 ScriptPromise generateRequest(ScriptState*, const String& initDataType, cons
t DOMArrayPiece& initData); |
| 81 ScriptPromise load(ScriptState*, const String& sessionId); | 84 ScriptPromise load(ScriptState*, const String& sessionId); |
| 82 | 85 |
| 83 ScriptPromise update(ScriptState*, const DOMArrayPiece& response); | 86 ScriptPromise update(ScriptState*, const DOMArrayPiece& response); |
| 84 ScriptPromise close(ScriptState*); | 87 ScriptPromise close(ScriptState*); |
| 85 ScriptPromise remove(ScriptState*); | 88 ScriptPromise remove(ScriptState*); |
| 86 | 89 |
| 87 // EventTarget | 90 // EventTarget |
| 88 const AtomicString& interfaceName() const override; | 91 const AtomicString& interfaceName() const override; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 typedef ScriptPromiseProperty<Member<MediaKeySession>, ToV8UndefinedGenerato
r, Member<DOMException>> ClosedPromise; | 141 typedef ScriptPromiseProperty<Member<MediaKeySession>, ToV8UndefinedGenerato
r, Member<DOMException>> ClosedPromise; |
| 139 Member<ClosedPromise> m_closedPromise; | 142 Member<ClosedPromise> m_closedPromise; |
| 140 | 143 |
| 141 HeapDeque<Member<PendingAction>> m_pendingActions; | 144 HeapDeque<Member<PendingAction>> m_pendingActions; |
| 142 Timer<MediaKeySession> m_actionTimer; | 145 Timer<MediaKeySession> m_actionTimer; |
| 143 }; | 146 }; |
| 144 | 147 |
| 145 } // namespace blink | 148 } // namespace blink |
| 146 | 149 |
| 147 #endif // MediaKeySession_h | 150 #endif // MediaKeySession_h |
| OLD | NEW |