#ifndef WebMediaPlayerClient_h
#define WebMediaPlayerClient_h
#include "WebMediaPlayer.h"
namespace blink {
class WebInbandTextTrack;
class WebLayer;
class WebMediaSource;
class WebPlugin;
class WebRequest;
class WebURL;
class WebMediaPlayerClient {
public:
enum MediaKeyErrorCode {
MediaKeyErrorCodeUnknown = 1,
MediaKeyErrorCodeClient,
MediaKeyErrorCodeService,
MediaKeyErrorCodeOutput,
MediaKeyErrorCodeHardwareChange,
MediaKeyErrorCodeDomain,
};
virtual void networkStateChanged() = 0;
virtual void readyStateChanged() = 0;
virtual void timeChanged() = 0;
virtual void repaint() = 0;
virtual void durationChanged() = 0;
virtual void sizeChanged() = 0;
virtual void setOpaque(bool) = 0;
virtual double volume() const = 0;
virtual void playbackStateChanged() = 0;
virtual WebMediaPlayer::Preload preload() const = 0;
virtual void keyAdded(const WebString& keySystem, const WebString& sessionId) = 0;
virtual void keyError(const WebString& keySystem, const WebString& sessionId, MediaKeyErrorCode, unsigned short systemCode) = 0;
virtual void keyMessage(const WebString& keySystem, const WebString& sessionId, const unsigned char* message, unsigned messageLength, const WebURL& defaultURL) = 0;
virtual void keyNeeded(const WebString& contentType, const unsigned char* initData, unsigned initDataLength) = 0;
virtual void setWebLayer(WebLayer*) = 0;
virtual void addTextTrack(WebInbandTextTrack*) = 0;
virtual void removeTextTrack(WebInbandTextTrack*) = 0;
virtual void mediaSourceOpened(WebMediaSource*) = 0;
virtual void requestFullscreen() = 0;
virtual void requestSeek(double) = 0;
protected:
~WebMediaPlayerClient() { }
};
}
#endif