Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(271)

Side by Side Diff: third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.h

Issue 2567913002: Rename ActiveDOMObject to SuspendableObject (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 10 matching lines...) Expand all
21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 * THE POSSIBILITY OF SUCH DAMAGE. 23 * THE POSSIBILITY OF SUCH DAMAGE.
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/ActiveScriptWrappable.h" 29 #include "bindings/core/v8/ActiveScriptWrappable.h"
30 #include "bindings/core/v8/ScriptPromiseProperty.h" 30 #include "bindings/core/v8/ScriptPromiseProperty.h"
31 #include "core/dom/ActiveDOMObject.h"
32 #include "core/dom/DOMArrayPiece.h" 31 #include "core/dom/DOMArrayPiece.h"
32 #include "core/dom/SuspendableObject.h"
33 #include "modules/EventTargetModules.h" 33 #include "modules/EventTargetModules.h"
34 #include "modules/encryptedmedia/MediaKeyStatusMap.h" 34 #include "modules/encryptedmedia/MediaKeyStatusMap.h"
35 #include "platform/Timer.h" 35 #include "platform/Timer.h"
36 #include "platform/heap/Handle.h" 36 #include "platform/heap/Handle.h"
37 #include "public/platform/WebContentDecryptionModuleSession.h" 37 #include "public/platform/WebContentDecryptionModuleSession.h"
38 #include "public/platform/WebEncryptedMediaTypes.h" 38 #include "public/platform/WebEncryptedMediaTypes.h"
39 #include <memory> 39 #include <memory>
40 40
41 namespace blink { 41 namespace blink {
42 42
(...skipping 14 matching lines...) Expand all
57 // object will be finalized and the WeakMember<> references will be cleared 57 // object will be finalized and the WeakMember<> references will be cleared
58 // out(zeroed) by the garbage collector. 58 // out(zeroed) by the garbage collector.
59 // 59 //
60 // Because this object controls the lifetime of the 60 // Because this object controls the lifetime of the
61 // WebContentDecryptionModuleSession, it may outlive any JavaScript references 61 // WebContentDecryptionModuleSession, it may outlive any JavaScript references
62 // as long as the MediaKeys object is alive. 62 // as long as the MediaKeys object is alive.
63 // The WebContentDecryptionModuleSession has the same lifetime as this object. 63 // The WebContentDecryptionModuleSession has the same lifetime as this object.
64 class MediaKeySession final 64 class MediaKeySession final
65 : public EventTargetWithInlineData, 65 : public EventTargetWithInlineData,
66 public ActiveScriptWrappable, 66 public ActiveScriptWrappable,
67 public ActiveDOMObject, 67 public SuspendableObject,
68 private WebContentDecryptionModuleSession::Client { 68 private WebContentDecryptionModuleSession::Client {
69 DEFINE_WRAPPERTYPEINFO(); 69 DEFINE_WRAPPERTYPEINFO();
70 USING_GARBAGE_COLLECTED_MIXIN(MediaKeySession); 70 USING_GARBAGE_COLLECTED_MIXIN(MediaKeySession);
71 USING_PRE_FINALIZER(MediaKeySession, dispose); 71 USING_PRE_FINALIZER(MediaKeySession, dispose);
72 72
73 public: 73 public:
74 static MediaKeySession* create(ScriptState*, 74 static MediaKeySession* create(ScriptState*,
75 MediaKeys*, 75 MediaKeys*,
76 WebEncryptedMediaSessionType); 76 WebEncryptedMediaSessionType);
77 77
(...skipping 14 matching lines...) Expand all
92 ScriptPromise close(ScriptState*); 92 ScriptPromise close(ScriptState*);
93 ScriptPromise remove(ScriptState*); 93 ScriptPromise remove(ScriptState*);
94 94
95 // EventTarget 95 // EventTarget
96 const AtomicString& interfaceName() const override; 96 const AtomicString& interfaceName() const override;
97 ExecutionContext* getExecutionContext() const override; 97 ExecutionContext* getExecutionContext() const override;
98 98
99 // ScriptWrappable 99 // ScriptWrappable
100 bool hasPendingActivity() const final; 100 bool hasPendingActivity() const final;
101 101
102 // ActiveDOMObject 102 // SuspendableObject
103 void contextDestroyed() override; 103 void contextDestroyed() override;
104 104
105 DECLARE_VIRTUAL_TRACE(); 105 DECLARE_VIRTUAL_TRACE();
106 106
107 private: 107 private:
108 class PendingAction; 108 class PendingAction;
109 friend class NewSessionResultPromise; 109 friend class NewSessionResultPromise;
110 friend class LoadSessionResultPromise; 110 friend class LoadSessionResultPromise;
111 111
112 MediaKeySession(ScriptState*, MediaKeys*, WebEncryptedMediaSessionType); 112 MediaKeySession(ScriptState*, MediaKeys*, WebEncryptedMediaSessionType);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 ClosedPromise; 158 ClosedPromise;
159 Member<ClosedPromise> m_closedPromise; 159 Member<ClosedPromise> m_closedPromise;
160 160
161 HeapDeque<Member<PendingAction>> m_pendingActions; 161 HeapDeque<Member<PendingAction>> m_pendingActions;
162 Timer<MediaKeySession> m_actionTimer; 162 Timer<MediaKeySession> m_actionTimer;
163 }; 163 };
164 164
165 } // namespace blink 165 } // namespace blink
166 166
167 #endif // MediaKeySession_h 167 #endif // MediaKeySession_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698