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

Unified Diff: Source/core/html/HTMLMediaElement.h

Issue 157423003: Remove the dependency on encryptedmedia from HTMLMediaElement. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address review comments. Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/html/HTMLMediaElement.cpp » ('j') | Source/core/html/HTMLMediaElement.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLMediaElement.h
diff --git a/Source/core/html/HTMLMediaElement.h b/Source/core/html/HTMLMediaElement.h
index 8508fc2d52de60904aa3943c0ad6c87c40492652..630cad9fb3f1ff46b50ae5c7dbde8824d534e3ce 100644
--- a/Source/core/html/HTMLMediaElement.h
+++ b/Source/core/html/HTMLMediaElement.h
@@ -58,7 +58,6 @@ class KURL;
class MediaController;
class MediaControls;
class MediaError;
-class MediaKeys;
class HTMLMediaSource;
class TextTrackList;
class TimeRanges;
@@ -72,7 +71,7 @@ typedef Vector<CueInterval> CueList;
// But it can't be until the Chromium WebMediaPlayerClientImpl class is fixed so it
// no longer depends on typecasting a MediaPlayerClient to an HTMLMediaElement.
-class HTMLMediaElement : public HTMLElement, public MediaPlayerClient, public ActiveDOMObject, public MediaControllerInterface
+class HTMLMediaElement : public Supplementable<HTMLMediaElement>, public HTMLElement, public MediaPlayerClient, public ActiveDOMObject, public MediaControllerInterface
, private TextTrackClient
{
public:
@@ -82,6 +81,7 @@ public:
static bool isMediaStreamURL(const String& url);
MediaPlayer* player() const { return m_player.get(); }
+ blink::WebMediaPlayer* webMediaPlayer() const { return m_player ? m_player->webMediaPlayer() : 0; }
ddorwin 2014/02/27 00:37:59 This seems fishy and like a layering violation, th
acolwell GONE FROM CHROMIUM 2014/02/27 01:11:11 I asked him to put this here. The MediaPlayer laye
virtual bool isVideo() const = 0;
virtual bool hasVideo() const OVERRIDE { return false; }
@@ -149,23 +149,6 @@ public:
void closeMediaSource();
void durationChanged(double duration);
- // encrypted media extensions (v0.1b)
- void webkitGenerateKeyRequest(const String& keySystem, PassRefPtr<Uint8Array> initData, ExceptionState&);
- void webkitGenerateKeyRequest(const String& keySystem, ExceptionState&);
- void webkitAddKey(const String& keySystem, PassRefPtr<Uint8Array> key, PassRefPtr<Uint8Array> initData, const String& sessionId, ExceptionState&);
- void webkitAddKey(const String& keySystem, PassRefPtr<Uint8Array> key, ExceptionState&);
- void webkitCancelKeyRequest(const String& keySystem, const String& sessionId, ExceptionState&);
-
- DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitkeyadded);
- DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitkeyerror);
- DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitkeymessage);
- DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitneedkey);
-
- // encrypted media extensions (WD)
- MediaKeys* mediaKeys() const { return m_mediaKeys.get(); }
- void setMediaKeys(MediaKeys*, ExceptionState&);
- DEFINE_ATTRIBUTE_EVENT_LISTENER(needkey);
-
// controls
bool controls() const;
void setControls(bool);
@@ -280,6 +263,8 @@ public:
MediaController* controller() const;
void setController(PassRefPtr<MediaController>); // Resets the MediaGroup and sets the MediaController.
+ void scheduleEvent(PassRefPtr<Event>);
+
protected:
HTMLMediaElement(const QualifiedName&, Document&);
virtual ~HTMLMediaElement();
@@ -354,11 +339,6 @@ private:
virtual void mediaPlayerRepaint() OVERRIDE FINAL;
virtual void mediaPlayerSizeChanged() OVERRIDE FINAL;
- virtual void mediaPlayerKeyAdded(const String& keySystem, const String& sessionId) OVERRIDE FINAL;
- virtual void mediaPlayerKeyError(const String& keySystem, const String& sessionId, MediaPlayerClient::MediaKeyErrorCode, unsigned short systemCode) OVERRIDE FINAL;
- virtual void mediaPlayerKeyMessage(const String& keySystem, const String& sessionId, const unsigned char* message, unsigned messageLength, const KURL& defaultURL) OVERRIDE FINAL;
- virtual bool mediaPlayerKeyNeeded(const String& contentType, const unsigned char* initData, unsigned initDataLength) OVERRIDE FINAL;
-
virtual CORSMode mediaPlayerCORSMode() const OVERRIDE FINAL;
virtual void mediaPlayerSetWebLayer(blink::WebLayer*) OVERRIDE FINAL;
@@ -448,19 +428,6 @@ private:
bool isBlockedOnMediaController() const;
bool isAutoplaying() const { return m_autoplaying; }
- // Currently we have both EME v0.1b and EME WD implemented in media element.
- // But we do not want to support both at the same time. The one used first
- // will be supported. Use |m_emeMode| to track this selection.
- // FIXME: Remove EmeMode once EME v0.1b support is removed. See crbug.com/249976.
- enum EmeMode { EmeModeNotSelected, EmeModePrefixed, EmeModeUnprefixed };
-
- // check (and set if necessary) the encrypted media extensions (EME) mode
- // (v0.1b or WD). Returns whether the mode is allowed and successfully set.
- bool setEmeMode(EmeMode, ExceptionState&);
-
- blink::WebContentDecryptionModule* contentDecryptionModule();
- void setMediaKeysInternal(MediaKeys*);
-
Timer<HTMLMediaElement> m_loadTimer;
Timer<HTMLMediaElement> m_progressEventTimer;
Timer<HTMLMediaElement> m_playbackProgressTimer;
@@ -566,10 +533,6 @@ private:
friend class TrackDisplayUpdateScope;
- EmeMode m_emeMode;
-
- RefPtrWillBePersistent<MediaKeys> m_mediaKeys;
-
static URLRegistry* s_mediaStreamRegistry;
};
« no previous file with comments | « no previous file | Source/core/html/HTMLMediaElement.cpp » ('j') | Source/core/html/HTMLMediaElement.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698