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

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

Issue 1805843002: [v8 gc] Introduce a base class for all objects that can have pending activity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 4 years, 9 months 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 MediaKeys_h 26 #ifndef MediaKeys_h
27 #define MediaKeys_h 27 #define MediaKeys_h
28 28
29 #include "bindings/core/v8/ScriptPromise.h" 29 #include "bindings/core/v8/ScriptPromise.h"
30 #include "bindings/core/v8/ScriptWrappable.h" 30 #include "bindings/core/v8/ScriptWrappable.h"
31 #include "bindings/core/v8/V8GCRoot.h"
31 #include "core/dom/ActiveDOMObject.h" 32 #include "core/dom/ActiveDOMObject.h"
32 #include "core/dom/DOMArrayPiece.h" 33 #include "core/dom/DOMArrayPiece.h"
33 #include "platform/Timer.h" 34 #include "platform/Timer.h"
34 #include "public/platform/WebContentDecryptionModule.h" 35 #include "public/platform/WebContentDecryptionModule.h"
35 #include "public/platform/WebEncryptedMediaTypes.h" 36 #include "public/platform/WebEncryptedMediaTypes.h"
36 #include "public/platform/WebString.h" 37 #include "public/platform/WebString.h"
37 #include "public/platform/WebVector.h" 38 #include "public/platform/WebVector.h"
38 #include "wtf/Forward.h" 39 #include "wtf/Forward.h"
39 #include "wtf/text/WTFString.h" 40 #include "wtf/text/WTFString.h"
40 41
41 namespace blink { 42 namespace blink {
42 43
43 class ExceptionState; 44 class ExceptionState;
44 class ExecutionContext; 45 class ExecutionContext;
45 class HTMLMediaElement; 46 class HTMLMediaElement;
46 class MediaKeySession; 47 class MediaKeySession;
47 class ScriptState; 48 class ScriptState;
48 class WebContentDecryptionModule; 49 class WebContentDecryptionModule;
49 50
50 // References are held by JS and HTMLMediaElement. 51 // References are held by JS and HTMLMediaElement.
51 // The WebContentDecryptionModule has the same lifetime as this object. 52 // The WebContentDecryptionModule has the same lifetime as this object.
52 class MediaKeys : public GarbageCollectedFinalized<MediaKeys>, public ActiveDOMO bject, public ScriptWrappable { 53 class MediaKeys : public GarbageCollectedFinalized<MediaKeys>, public ActiveDOMO bject, public ScriptWrappable, public V8GCRoot {
53 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MediaKeys); 54 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MediaKeys);
54 DEFINE_WRAPPERTYPEINFO(); 55 DEFINE_WRAPPERTYPEINFO();
55 public: 56 public:
56 static MediaKeys* create(ExecutionContext*, const WebVector<WebEncryptedMedi aSessionType>& supportedSessionTypes, PassOwnPtr<WebContentDecryptionModule>); 57 static MediaKeys* create(ExecutionContext*, const WebVector<WebEncryptedMedi aSessionType>& supportedSessionTypes, PassOwnPtr<WebContentDecryptionModule>);
57 ~MediaKeys() override; 58 ~MediaKeys() override;
58 59
59 MediaKeySession* createSession(ScriptState*, const String& sessionTypeString , ExceptionState&); 60 MediaKeySession* createSession(ScriptState*, const String& sessionTypeString , ExceptionState&);
60 61
61 ScriptPromise setServerCertificate(ScriptState*, const DOMArrayPiece& server Certificate); 62 ScriptPromise setServerCertificate(ScriptState*, const DOMArrayPiece& server Certificate);
62 63
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // object will be prevented until the setMediaKeys() completes. 113 // object will be prevented until the setMediaKeys() completes.
113 bool m_reservedForMediaElement; 114 bool m_reservedForMediaElement;
114 115
115 HeapDeque<Member<PendingAction>> m_pendingActions; 116 HeapDeque<Member<PendingAction>> m_pendingActions;
116 Timer<MediaKeys> m_timer; 117 Timer<MediaKeys> m_timer;
117 }; 118 };
118 119
119 } // namespace blink 120 } // namespace blink
120 121
121 #endif // MediaKeys_h 122 #endif // MediaKeys_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698