| Index: Source/modules/encryptedmedia/MediaKeys.h
|
| diff --git a/Source/modules/encryptedmedia/MediaKeys.h b/Source/modules/encryptedmedia/MediaKeys.h
|
| index 9691cfe40c3ec3de6b8da343d924ace605226028..c437d965fa7134e4531d69891fe6312e26f21ba4 100644
|
| --- a/Source/modules/encryptedmedia/MediaKeys.h
|
| +++ b/Source/modules/encryptedmedia/MediaKeys.h
|
| @@ -31,7 +31,6 @@
|
| #include "bindings/v8/ScriptWrappable.h"
|
| #include "core/dom/EventTarget.h"
|
| #include "core/dom/ExceptionCode.h"
|
| -#include "modules/encryptedmedia/CDM.h"
|
| #include "wtf/OwnPtr.h"
|
| #include "wtf/PassRefPtr.h"
|
| #include "wtf/RefCounted.h"
|
| @@ -41,10 +40,15 @@
|
|
|
| namespace WebCore {
|
|
|
| +class CDM;
|
| class MediaKeySession;
|
| class HTMLMediaElement;
|
|
|
| -class MediaKeys : public RefCounted<MediaKeys>, public ScriptWrappable, public CDMClient {
|
| +// References are held by JS and HTMLMediaElement.
|
| +// The CDM has the same lifetime as this object.
|
| +// Maintains a reference to all MediaKeySessions created to ensure they live as
|
| +// long as this object unless explicitly close()'d.
|
| +class MediaKeys : public RefCounted<MediaKeys>, public ScriptWrappable {
|
| public:
|
| static PassRefPtr<MediaKeys> create(const String& keySystem, ExceptionCode&);
|
| ~MediaKeys();
|
| @@ -52,21 +56,16 @@ public:
|
| PassRefPtr<MediaKeySession> createSession(ScriptExecutionContext*, const String& mimeType, Uint8Array* initData, ExceptionCode&);
|
|
|
| const String& keySystem() const { return m_keySystem; }
|
| - CDM* cdm() { return m_cdm.get(); }
|
|
|
| - HTMLMediaElement* mediaElement() const { return m_mediaElement; }
|
| void setMediaElement(HTMLMediaElement*);
|
|
|
| protected:
|
| - // CDMClient:
|
| - virtual MediaPlayer* cdmMediaPlayer(const CDM*) const OVERRIDE;
|
| -
|
| MediaKeys(const String& keySystem, PassOwnPtr<CDM>);
|
|
|
| Vector<RefPtr<MediaKeySession> > m_sessions;
|
|
|
| HTMLMediaElement* m_mediaElement;
|
| - String m_keySystem;
|
| + const String m_keySystem;
|
| OwnPtr<CDM> m_cdm;
|
| };
|
|
|
|
|