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

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

Issue 606653006: bindings: Adds DOMArrayBuffer, etc. as thin wrappers for ArrayBuffer, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed Win GPU tests (DOMDataView). Created 6 years, 2 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 | Annotate | Revision Log
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 15 matching lines...) Expand all
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" 34 #include "platform/heap/Handle.h"
35 #include "public/platform/WebContentDecryptionModuleSession.h" 35 #include "public/platform/WebContentDecryptionModuleSession.h"
36 #include "wtf/Forward.h"
37 36
38 namespace blink { 37 namespace blink {
39 38
40 class ScriptPromise; 39 class DOMArrayBuffer;
41 class ScriptState; 40 class DOMArrayBufferView;
42 class GenericEventQueue; 41 class GenericEventQueue;
43 class MediaKeyError; 42 class MediaKeyError;
44 class MediaKeys; 43 class MediaKeys;
44 class ScriptPromise;
45 class ScriptState;
45 class WebContentDecryptionModule; 46 class WebContentDecryptionModule;
46 class WebString; 47 class WebString;
47 48
48 // References are held by JS only. However, even if all JS references are 49 // 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 50 // 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 51 // 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 52 // the CDM to continue to fire events for this session, as long as the session
52 // is open. 53 // is open.
53 // 54 //
54 // WeakPtr<MediaKeys> is used instead of having MediaKeys and MediaKeySession 55 // WeakPtr<MediaKeys> is used instead of having MediaKeys and MediaKeySession
(...skipping 10 matching lines...) Expand all
65 DEFINE_WRAPPERTYPEINFO(); 66 DEFINE_WRAPPERTYPEINFO();
66 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MediaKeySession); 67 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MediaKeySession);
67 public: 68 public:
68 static MediaKeySession* create(ScriptState*, MediaKeys*, const String& sessi onType); 69 static MediaKeySession* create(ScriptState*, MediaKeys*, const String& sessi onType);
69 virtual ~MediaKeySession(); 70 virtual ~MediaKeySession();
70 71
71 const String& keySystem() const { return m_keySystem; } 72 const String& keySystem() const { return m_keySystem; }
72 String sessionId() const; 73 String sessionId() const;
73 ScriptPromise closed(ScriptState*); 74 ScriptPromise closed(ScriptState*);
74 75
75 ScriptPromise generateRequest(ScriptState*, const String& initDataType, Arra yBuffer* initData); 76 ScriptPromise generateRequest(ScriptState*, const String& initDataType, DOMA rrayBuffer* initData);
76 ScriptPromise generateRequest(ScriptState*, const String& initDataType, Arra yBufferView* initData); 77 ScriptPromise generateRequest(ScriptState*, const String& initDataType, DOMA rrayBufferView* initData);
77 78
78 void setError(MediaKeyError*); 79 void setError(MediaKeyError*);
79 MediaKeyError* error() { return m_error.get(); } 80 MediaKeyError* error() { return m_error.get(); }
80 81
81 ScriptPromise update(ScriptState*, ArrayBuffer* response); 82 ScriptPromise update(ScriptState*, DOMArrayBuffer* response);
82 ScriptPromise update(ScriptState*, ArrayBufferView* response); 83 ScriptPromise update(ScriptState*, DOMArrayBufferView* response);
83 ScriptPromise release(ScriptState*); 84 ScriptPromise release(ScriptState*);
84 85
85 void enqueueEvent(PassRefPtrWillBeRawPtr<Event>); 86 void enqueueEvent(PassRefPtrWillBeRawPtr<Event>);
86 87
87 // EventTarget 88 // EventTarget
88 virtual const AtomicString& interfaceName() const OVERRIDE; 89 virtual const AtomicString& interfaceName() const OVERRIDE;
89 virtual ExecutionContext* executionContext() const OVERRIDE; 90 virtual ExecutionContext* executionContext() const OVERRIDE;
90 91
91 // ActiveDOMObject 92 // ActiveDOMObject
92 virtual bool hasPendingActivity() const OVERRIDE; 93 virtual bool hasPendingActivity() const OVERRIDE;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 typedef ScriptPromiseProperty<Member<MediaKeySession>, V8UndefinedType, RefP trWillBeMember<DOMException> > ClosedPromise; 136 typedef ScriptPromiseProperty<Member<MediaKeySession>, V8UndefinedType, RefP trWillBeMember<DOMException> > ClosedPromise;
136 Member<ClosedPromise> m_closedPromise; 137 Member<ClosedPromise> m_closedPromise;
137 138
138 HeapDeque<Member<PendingAction> > m_pendingActions; 139 HeapDeque<Member<PendingAction> > m_pendingActions;
139 Timer<MediaKeySession> m_actionTimer; 140 Timer<MediaKeySession> m_actionTimer;
140 }; 141 };
141 142
142 } // namespace blink 143 } // namespace blink
143 144
144 #endif // MediaKeySession_h 145 #endif // MediaKeySession_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698