diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-17 20:04:29 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-17 20:04:29 +0000 |
commit | 40e5ac1f115a7905372d3414debaac63a5244886 (patch) | |
tree | 1613d237a6e69e0d1f95b1953b8b2572a9f5b52a /chrome | |
parent | b0c2bda2081e3627baac5814d6c66ef121b88515 (diff) | |
download | chromium_src-40e5ac1f115a7905372d3414debaac63a5244886.zip chromium_src-40e5ac1f115a7905372d3414debaac63a5244886.tar.gz chromium_src-40e5ac1f115a7905372d3414debaac63a5244886.tar.bz2 |
andrew's patch
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11904 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/renderer/webmediaplayer_delegate_impl.cc | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/chrome/renderer/webmediaplayer_delegate_impl.cc b/chrome/renderer/webmediaplayer_delegate_impl.cc index 78dcd4c..b9e70b4 100644 --- a/chrome/renderer/webmediaplayer_delegate_impl.cc +++ b/chrome/renderer/webmediaplayer_delegate_impl.cc @@ -14,23 +14,23 @@ class NotifyWebMediaPlayerTask : public CancelableTask { public: - NotifyWebMediaPlayerTask(webkit_glue::WebMediaPlayer* web_media_player, + NotifyWebMediaPlayerTask(WebMediaPlayerDelegateImpl* delegate, WebMediaPlayerMethod method) - : web_media_player_(web_media_player), + : delegate_(delegate_), method_(method) {} virtual void Run() { - if (web_media_player_) { - (web_media_player_->*(method_))(); + if (delegate_) { + (delegate_->web_media_player()->*(method_))(); } } virtual void Cancel() { - web_media_player_ = NULL; + delegate_ = NULL; } private: - webkit_glue::WebMediaPlayer* web_media_player_; + WebMediaPlayerDelegateImpl* delegate_; WebMediaPlayerMethod method_; DISALLOW_COPY_AND_ASSIGN(NotifyWebMediaPlayerTask); @@ -356,8 +356,7 @@ void WebMediaPlayerDelegateImpl::PostTask(int index, AutoLock auto_lock(task_lock_); if(!tasks_[index]) { - CancelableTask* task = new NotifyWebMediaPlayerTask(web_media_player_, - method); + CancelableTask* task = new NotifyWebMediaPlayerTask(this, method); tasks_[index] = task; main_loop_->PostTask(FROM_HERE, task); } |