summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webmediaplayer_impl.h
diff options
context:
space:
mode:
authorhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-16 01:29:50 +0000
committerhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-16 01:29:50 +0000
commit4f92fbc2765f3bd2db6d076c9b4d17410b847538 (patch)
tree2b4977e589b6cebefea29f3d425bd5d0a34c46b6 /webkit/glue/webmediaplayer_impl.h
parent30973dfd8a5c23cce0d726c6fdd8c298ad94f324 (diff)
downloadchromium_src-4f92fbc2765f3bd2db6d076c9b4d17410b847538.zip
chromium_src-4f92fbc2765f3bd2db6d076c9b4d17410b847538.tar.gz
chromium_src-4f92fbc2765f3bd2db6d076c9b4d17410b847538.tar.bz2
Report stalled event correctly for <video>
BUG=20127 BUG=13568 TEST=Opens a web page, stalled event should be fire only if network is actuall stalled. What this patch does: 1. Report Loading / Idle according to whether we are actively receiving data in the BuffereResourceLoader. This is done by signaling the network events to BufferedDataSource and then to the media playback pipeline. 2. Report byteLoaded() as the last byte position buffered. This will enable an actual ticking progress for the progress event. With this value actually ticking, stalled event is suppressed. Review URL: http://codereview.chromium.org/269002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29235 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webmediaplayer_impl.h')
-rw-r--r--webkit/glue/webmediaplayer_impl.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/webkit/glue/webmediaplayer_impl.h b/webkit/glue/webmediaplayer_impl.h
index 9348983..5c5de44 100644
--- a/webkit/glue/webmediaplayer_impl.h
+++ b/webkit/glue/webmediaplayer_impl.h
@@ -108,6 +108,7 @@ class WebMediaPlayerImpl : public WebKit::WebMediaPlayer,
void PipelineSeekCallback();
void PipelineEndedCallback();
void PipelineErrorCallback();
+ void NetworkEventCallback();
private:
// Invoke |webmediaplayer_| to perform a repaint.
@@ -125,6 +126,9 @@ class WebMediaPlayerImpl : public WebKit::WebMediaPlayer,
// Notify |webmediaplayer_| that a pipeline error has been set.
void PipelineErrorTask();
+ // Notify |webmediaplayer_| that there's a network event.
+ void NetworkEventTask();
+
// The render message loop where WebKit lives.
MessageLoop* render_loop_;
WebMediaPlayerImpl* webmediaplayer_;
@@ -229,6 +233,8 @@ class WebMediaPlayerImpl : public WebKit::WebMediaPlayer,
void OnPipelineError();
+ void OnNetworkEvent();
+
private:
// Helpers that set the network/ready state and notifies the client if
// they've changed.