| Index: Source/modules/encryptedmedia/MediaKeys.h
|
| diff --git a/Source/modules/encryptedmedia/MediaKeys.h b/Source/modules/encryptedmedia/MediaKeys.h
|
| index 96700140ec3bbd2bdeaa77ee6718f4aa8926d41d..640c24865fadd50b9343aa4ebc2f50c31c2c1e35 100644
|
| --- a/Source/modules/encryptedmedia/MediaKeys.h
|
| +++ b/Source/modules/encryptedmedia/MediaKeys.h
|
| @@ -28,6 +28,9 @@
|
|
|
| #include "bindings/v8/ScriptWrappable.h"
|
| #include "core/events/EventTarget.h"
|
| +#include "modules/encryptedmedia/MediaKeySession.h"
|
| +#include "platform/Timer.h"
|
| +#include "wtf/Deque.h"
|
| #include "wtf/OwnPtr.h"
|
| #include "wtf/PassRefPtr.h"
|
| #include "wtf/RefCounted.h"
|
| @@ -42,7 +45,6 @@ class WebContentDecryptionModule;
|
| namespace WebCore {
|
|
|
| class ContentDecryptionModule;
|
| -class MediaKeySession;
|
| class HTMLMediaElement;
|
| class ExceptionState;
|
|
|
| @@ -55,7 +57,7 @@ public:
|
| static PassRefPtr<MediaKeys> create(const String& keySystem, ExceptionState&);
|
| ~MediaKeys();
|
|
|
| - PassRefPtr<MediaKeySession> createSession(ExecutionContext*, const String& mimeType, Uint8Array* initData, ExceptionState&);
|
| + PassRefPtr<MediaKeySession> createSession(ExecutionContext*, const String& contentType, Uint8Array* initData, ExceptionState&);
|
|
|
| const String& keySystem() const { return m_keySystem; }
|
|
|
| @@ -65,12 +67,26 @@ public:
|
|
|
| protected:
|
| MediaKeys(const String& keySystem, PassOwnPtr<ContentDecryptionModule>);
|
| + void initializeNewSessionTimerFired(Timer<MediaKeys>*);
|
|
|
| Vector<RefPtr<MediaKeySession> > m_sessions;
|
|
|
| HTMLMediaElement* m_mediaElement;
|
| const String m_keySystem;
|
| OwnPtr<ContentDecryptionModule> m_cdm;
|
| +
|
| + // FIXME: Check whether |initData| can be changed by JS. Maybe we should not pass it as a pointer.
|
| + struct InitializeNewSessionData {
|
| + InitializeNewSessionData(PassRefPtr<MediaKeySession> session, const String& contentType, PassRefPtr<Uint8Array> initData)
|
| + : session(session)
|
| + , contentType(contentType)
|
| + , initData(initData) { }
|
| + RefPtr<MediaKeySession> session;
|
| + String contentType;
|
| + RefPtr<Uint8Array> initData;
|
| + };
|
| + Deque<InitializeNewSessionData> m_pendingInitializeNewSessionData;
|
| + Timer<MediaKeys> m_initializeNewSessionTimer;
|
| };
|
|
|
| }
|
|
|