Index: Source/core/platform/graphics/MediaPlayer.h |
diff --git a/Source/core/platform/graphics/MediaPlayer.h b/Source/core/platform/graphics/MediaPlayer.h |
index 874c7d9e1d0acc14e370a37beeeea0f17627cf23..6342917050829a2020f0cad18338660d2ea82254 100644 |
--- a/Source/core/platform/graphics/MediaPlayer.h |
+++ b/Source/core/platform/graphics/MediaPlayer.h |
@@ -121,13 +121,11 @@ public: |
// availability of the platformLayer(). |
virtual void mediaPlayerRenderingModeChanged(MediaPlayer*) { } |
-#if ENABLE(ENCRYPTED_MEDIA) |
enum MediaKeyErrorCode { UnknownError = 1, ClientError, ServiceError, OutputError, HardwareChangeError, DomainError }; |
virtual void mediaPlayerKeyAdded(MediaPlayer*, const String& /* keySystem */, const String& /* sessionId */) { } |
virtual void mediaPlayerKeyError(MediaPlayer*, const String& /* keySystem */, const String& /* sessionId */, MediaKeyErrorCode, unsigned short /* systemCode */) { } |
virtual void mediaPlayerKeyMessage(MediaPlayer*, const String& /* keySystem */, const String& /* sessionId */, const unsigned char* /* message */, unsigned /* messageLength */, const KURL& /* defaultURL */) { } |
virtual bool mediaPlayerKeyNeeded(MediaPlayer*, const String& /* keySystem */, const String& /* sessionId */, const unsigned char* /* initData */, unsigned /* initDataLength */) { return false; } |
-#endif |
#if ENABLE(ENCRYPTED_MEDIA_V2) |
virtual bool mediaPlayerKeyNeeded(MediaPlayer*, Uint8Array*) { return false; } |
@@ -200,7 +198,6 @@ public: |
void play(); |
void pause(); |
-#if ENABLE(ENCRYPTED_MEDIA) |
// Represents synchronous exceptions that can be thrown from the Encrypted Media methods. |
// This is different from the asynchronous MediaKeyError. |
enum MediaKeyException { NoError, InvalidPlayerState, KeySystemNotSupported }; |
@@ -208,7 +205,6 @@ public: |
MediaKeyException generateKeyRequest(const String& keySystem, const unsigned char* initData, unsigned initDataLength); |
MediaKeyException addKey(const String& keySystem, const unsigned char* key, unsigned keyLength, const unsigned char* initData, unsigned initDataLength, const String& sessionId); |
MediaKeyException cancelKeyRequest(const String& keySystem, const String& sessionId); |
-#endif |
bool paused() const; |
bool seeking() const; |
@@ -330,12 +326,10 @@ public: |
AudioSourceProvider* audioSourceProvider(); |
#endif |
-#if ENABLE(ENCRYPTED_MEDIA) |
void keyAdded(const String& keySystem, const String& sessionId); |
void keyError(const String& keySystem, const String& sessionId, MediaPlayerClient::MediaKeyErrorCode, unsigned short systemCode); |
void keyMessage(const String& keySystem, const String& sessionId, const unsigned char* message, unsigned messageLength, const KURL& defaultURL); |
bool keyNeeded(const String& keySystem, const String& sessionId, const unsigned char* initData, unsigned initDataLength); |
-#endif |
#if ENABLE(ENCRYPTED_MEDIA_V2) |
bool keyNeeded(Uint8Array* initData); |
@@ -378,11 +372,7 @@ private: |
}; |
typedef PassOwnPtr<MediaPlayerPrivateInterface> (*CreateMediaEnginePlayer)(MediaPlayer*); |
-#if ENABLE(ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA_V2) |
typedef MediaPlayer::SupportsType (*MediaEngineSupportsType)(const String& type, const String& codecs, const String& keySystem, const KURL& url); |
-#else |
-typedef MediaPlayer::SupportsType (*MediaEngineSupportsType)(const String& type, const String& codecs, const KURL& url); |
-#endif |
typedef void (*MediaEngineRegistrar)(CreateMediaEnginePlayer, MediaEngineSupportsType); |