diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-17 00:03:00 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-17 00:03:00 +0000 |
commit | 5df5165d0e0d7e6493dbca6d4c98a173a616467d (patch) | |
tree | eac9a804d96d9cd577f3ecca79be3766d099b369 /webkit/glue/webmediaplayer_impl.h | |
parent | f92a69826846102dfe32ac44bc36df79f803beb6 (diff) | |
download | chromium_src-5df5165d0e0d7e6493dbca6d4c98a173a616467d.zip chromium_src-5df5165d0e0d7e6493dbca6d4c98a173a616467d.tar.gz chromium_src-5df5165d0e0d7e6493dbca6d4c98a173a616467d.tar.bz2 |
Add resource loading glue code for WebMediaPlayerDelegate
Added glue code to ResourceHandle for WebMediaPlayerDelegate.
Review URL: http://codereview.chromium.org/18282
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8246 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webmediaplayer_impl.h')
-rw-r--r-- | webkit/glue/webmediaplayer_impl.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/webkit/glue/webmediaplayer_impl.h b/webkit/glue/webmediaplayer_impl.h index e8ed8f2..ddbdc16 100644 --- a/webkit/glue/webmediaplayer_impl.h +++ b/webkit/glue/webmediaplayer_impl.h @@ -8,19 +8,23 @@ #ifndef WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_ #define WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_ +#include "ResourceHandleClient.h" + #include "webkit/glue/webmediaplayer.h" #if ENABLE(VIDEO) namespace WebCore { class MediaPlayerPrivate; +class ResourceHandle; } namespace webkit_glue { class WebMediaPlayerDelegate; -class WebMediaPlayerImpl : public WebMediaPlayer { +class WebMediaPlayerImpl : public WebMediaPlayer, + WebCore::ResourceHandleClient { public: WebMediaPlayerImpl(WebCore::MediaPlayerPrivate* media_player_private); @@ -46,9 +50,27 @@ public: // Tell the media player to repaint itself. virtual void Repaint(); + // Load a media resource. + virtual void LoadMediaResource(const GURL& url); + + // Cancel loading the media resource. + virtual void CancelLoad(); + + // ResourceHandleClient methods + void willSendRequest(WebCore::ResourceHandle* handle, + WebCore::ResourceRequest& request, + const WebCore::ResourceResponse&); + void didReceiveResponse(WebCore::ResourceHandle* handle, + const WebCore::ResourceResponse& response); + void didReceiveData(WebCore::ResourceHandle* handle, const char *buffer, + int length, int); + void didFinishLoading(WebCore::ResourceHandle* handle); + void didFail(WebCore::ResourceHandle* handle, const WebCore::ResourceError&); + private: WebCore::MediaPlayerPrivate* media_player_private_; WebMediaPlayerDelegate* delegate_; + RefPtr<WebCore::ResourceHandle> resource_handle_; DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); }; |