diff options
author | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-15 17:18:05 +0000 |
---|---|---|
committer | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-15 17:18:05 +0000 |
commit | 9670691da1ff13fc4c0cd69fab4369b448f9019a (patch) | |
tree | 2317e355463e2215a0247f142f39d3c3abeb096b /webkit/glue/webmediaplayer_impl.h | |
parent | 7fd25315869cf0520d9dd813d407c58ff5c5508a (diff) | |
download | chromium_src-9670691da1ff13fc4c0cd69fab4369b448f9019a.zip chromium_src-9670691da1ff13fc4c0cd69fab4369b448f9019a.tar.gz chromium_src-9670691da1ff13fc4c0cd69fab4369b448f9019a.tar.bz2 |
Removed the bool parameter from PipelineCallback and cleaned up WebMediaPlayerImpl::Proxy.
This forces clients to check Pipeline::GetError() instead of using a simple true/false check for success. Also the bool parameter wasn't being used for Seek() and Stop() callbacks, further hinting at its removal.
BUG=16009
TEST=media_unittests pass, layout tests pass
Review URL: http://codereview.chromium.org/149584
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20738 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webmediaplayer_impl.h')
-rw-r--r-- | webkit/glue/webmediaplayer_impl.h | 54 |
1 files changed, 20 insertions, 34 deletions
diff --git a/webkit/glue/webmediaplayer_impl.h b/webkit/glue/webmediaplayer_impl.h index c13d30f..9e9522e 100644 --- a/webkit/glue/webmediaplayer_impl.h +++ b/webkit/glue/webmediaplayer_impl.h @@ -93,46 +93,29 @@ class WebMediaPlayerImpl : public WebKit::WebMediaPlayer, WebMediaPlayerImpl* webmediaplayer); virtual ~Proxy(); - // Fire a repaint event to WebKit. + // Public methods called from the video renderer. void Repaint(); + void SetVideoRenderer(VideoRendererImpl* video_renderer); - // Report to WebKit that time has changed. - void TimeChanged(); - - // Report to WebKit that network state has changed. - void NetworkStateChanged(WebKit::WebMediaPlayer::NetworkState state); + // Public methods called from WebMediaPlayerImpl. + void Paint(skia::PlatformCanvas* canvas, const gfx::Rect& dest_rect); + void SetSize(const gfx::Rect& rect); + void Detach(); - // Report the WebKit that ready state has changed. - void ReadyStateChanged(WebKit::WebMediaPlayer::ReadyState state); - - // Public methods to be called from video renderer. - void SetVideoRenderer(VideoRendererImpl* video_renderer); + // Public methods called from the pipeline via callback issued by + // WebMediaPlayerImpl. + void PipelineInitializationCallback(); + void PipelineSeekCallback(); private: - friend class WebMediaPlayerImpl; - // Invoke |webmediaplayer_| to perform a repaint. void RepaintTask(); - // Invoke |webmediaplayer_| to notify a time change event. - void TimeChangedTask(); - - // Saves the internal network state and notify WebKit to pick up the change. - void NetworkStateChangedTask(WebKit::WebMediaPlayer::NetworkState state); + // Notify |webmediaplayer_| that initialization has finished. + void PipelineInitializationTask(); - // Saves the internal ready state and notify WebKit to pick the change. - void ReadyStateChangedTask(WebKit::WebMediaPlayer::ReadyState state); - - void Paint(skia::PlatformCanvas* canvas, const gfx::Rect& dest_rect); - - void SetSize(const gfx::Rect& rect); - - // Detach from |webmediaplayer_|. - void Detach(); - - void PipelineInitializationCallback(bool success); - - void PipelineSeekCallback(bool success); + // Notify |webmediaplayer_| that a seek has finished. + void PipelineSeekTask(); // The render message loop where WebKit lives. MessageLoop* render_loop_; @@ -224,13 +207,16 @@ class WebMediaPlayerImpl : public WebKit::WebMediaPlayer, void Repaint(); - void TimeChanged(); + void OnPipelineInitialize(); - void SetNetworkState(WebKit::WebMediaPlayer::NetworkState state); + void OnPipelineSeek(); + private: + // Helpers that set the network/ready state and notifies the client if + // they've changed. + void SetNetworkState(WebKit::WebMediaPlayer::NetworkState state); void SetReadyState(WebKit::WebMediaPlayer::ReadyState state); - private: // Destroy resources held. void Destroy(); |