summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webmediaplayer_impl.h
diff options
context:
space:
mode:
authorboliu@chromium.org <boliu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-11 17:40:15 +0000
committerboliu@chromium.org <boliu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-11 17:40:15 +0000
commit5badb08f6f862645e950d97c7a58995724cd0c42 (patch)
tree415b0860139754f61db04cde1f4dba9501fd47be /webkit/glue/webmediaplayer_impl.h
parent21ab5b9c9c64061b15d79a29b5ea337e4acc8953 (diff)
downloadchromium_src-5badb08f6f862645e950d97c7a58995724cd0c42.zip
chromium_src-5badb08f6f862645e950d97c7a58995724cd0c42.tar.gz
chromium_src-5badb08f6f862645e950d97c7a58995724cd0c42.tar.bz2
Make MediaFilter::Stop() asynchronous.
This is the second issue regarding making Stop() asynchronous. All Stop() in subclasses of MediaFilter is made to accept a callback and runs the callback at the end of its stop. BUG=16059 TEST=media_unittest, unit_tests, test_shell_tests still passes Review URL: http://codereview.chromium.org/2541003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49548 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webmediaplayer_impl.h')
-rw-r--r--webkit/glue/webmediaplayer_impl.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/webkit/glue/webmediaplayer_impl.h b/webkit/glue/webmediaplayer_impl.h
index 3bce689..f561866e 100644
--- a/webkit/glue/webmediaplayer_impl.h
+++ b/webkit/glue/webmediaplayer_impl.h
@@ -58,6 +58,7 @@
#include "base/lock.h"
#include "base/message_loop.h"
#include "base/ref_counted.h"
+#include "base/waitable_event.h"
#include "gfx/rect.h"
#include "gfx/size.h"
#include "media/base/filters.h"
@@ -259,6 +260,10 @@ class WebMediaPlayerImpl : public WebKit::WebMediaPlayer,
// Destroy resources held.
void Destroy();
+ // Callback executed after |pipeline_| stops which signals Destroy()
+ // to continue.
+ void PipelineStoppedCallback();
+
// Getter method to |client_|.
WebKit::WebMediaPlayerClient* GetClient();
@@ -300,6 +305,9 @@ class WebMediaPlayerImpl : public WebKit::WebMediaPlayer,
scoped_refptr<Proxy> proxy_;
+ // Used to block Destroy() until Pipeline::Stop() is completed.
+ base::WaitableEvent pipeline_stopped_;
+
#if WEBKIT_USING_CG
scoped_ptr<skia::PlatformCanvas> skia_canvas_;
#endif