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 /chrome/renderer | |
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 'chrome/renderer')
-rw-r--r-- | chrome/renderer/webmediaplayer_delegate_impl.cc | 25 | ||||
-rw-r--r-- | chrome/renderer/webmediaplayer_delegate_impl.h | 8 |
2 files changed, 32 insertions, 1 deletions
diff --git a/chrome/renderer/webmediaplayer_delegate_impl.cc b/chrome/renderer/webmediaplayer_delegate_impl.cc index f4d3110..f0aafd1 100644 --- a/chrome/renderer/webmediaplayer_delegate_impl.cc +++ b/chrome/renderer/webmediaplayer_delegate_impl.cc @@ -36,7 +36,6 @@ void WebMediaPlayerDelegateImpl::Initialize( } void WebMediaPlayerDelegateImpl::Load(const GURL& url) { - // TODO(hclam): delegate to google's media player } void WebMediaPlayerDelegateImpl::CancelLoad() { @@ -98,3 +97,27 @@ void WebMediaPlayerDelegateImpl::Paint(skia::PlatformCanvas *canvas, const gfx::Rect& rect) { // TODO(hclam): grab a frame from the internal player and draw it. } + +void WebMediaPlayerDelegateImpl::WillSendRequest(WebRequest& request, + const WebResponse& response) { + // TODO(hclam): do we need to change the request? +} + +void WebMediaPlayerDelegateImpl::DidReceiveResponse( + const WebResponse& response) { + // TODO(hclam): tell the video piepline to prepare for arriving bytes. +} + +void WebMediaPlayerDelegateImpl::DidReceiveData(const char* buf, size_t size) { + // TODO(hclam): direct the data to video pipeline's data source +} + +void WebMediaPlayerDelegateImpl::DidFinishLoading() { + // TODO(hclam): do appropriate actions related to load. We should wait + // for video pipeline to be initialized and fire a LOADED event. +} + +void WebMediaPlayerDelegateImpl::DidFail(const WebError& error) { + // Simply fires a LOAD_FAILED event. + // TODO(hclam): will also need to fire a MediaError event. +} diff --git a/chrome/renderer/webmediaplayer_delegate_impl.h b/chrome/renderer/webmediaplayer_delegate_impl.h index 4e6f53e..8da1889 100644 --- a/chrome/renderer/webmediaplayer_delegate_impl.h +++ b/chrome/renderer/webmediaplayer_delegate_impl.h @@ -74,6 +74,14 @@ class WebMediaPlayerDelegateImpl : public webkit_glue::WebMediaPlayerDelegate { virtual int64 GetBytesLoaded() const { return bytes_loaded_; } virtual int64 GetTotalBytes() const { return total_bytes_; } + // Data handlers. + virtual void WillSendRequest(WebRequest& request, + const WebResponse& response); + virtual void DidReceiveResponse(const WebResponse& response); + virtual void DidReceiveData(const char* buf, size_t size); + virtual void DidFinishLoading(); + virtual void DidFail(const WebError& error); + // Inline getters. webkit_glue::WebMediaPlayer* web_media_player() { return web_media_player_; } |