| OLD | NEW |
| 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. Use of this |
| 2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
| 3 // LICENSE file. | 3 // LICENSE file. |
| 4 // | 4 // |
| 5 // Delegate calls from WebCore::MediaPlayerPrivate to google's video player. | 5 // Delegate calls from WebCore::MediaPlayerPrivate to google's video player. |
| 6 // It contains PipelineImpl which is the actual media player pipeline, it glues | 6 // It contains PipelineImpl which is the actual media player pipeline, it glues |
| 7 // the media player pipeline, data source, audio renderer and renderer. | 7 // the media player pipeline, data source, audio renderer and renderer. |
| 8 // PipelineImpl would creates multiple threads and access some public methods | 8 // PipelineImpl would creates multiple threads and access some public methods |
| 9 // of this class, so we need to be extra careful about concurrent access of | 9 // of this class, so we need to be extra careful about concurrent access of |
| 10 // methods and members. | 10 // methods and members. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 // at destruction of this class we will need to unhook it from destruction event | 37 // at destruction of this class we will need to unhook it from destruction event |
| 38 // list of the main thread. | 38 // list of the main thread. |
| 39 | 39 |
| 40 #ifndef CHROME_RENDERER_WEBMEDIAPLAYER_DELEGATE_IMPL_H_ | 40 #ifndef CHROME_RENDERER_WEBMEDIAPLAYER_DELEGATE_IMPL_H_ |
| 41 #define CHROME_RENDERER_WEBMEDIAPLAYER_DELEGATE_IMPL_H_ | 41 #define CHROME_RENDERER_WEBMEDIAPLAYER_DELEGATE_IMPL_H_ |
| 42 | 42 |
| 43 #include <vector> | 43 #include <vector> |
| 44 | 44 |
| 45 #include "base/lock.h" | 45 #include "base/lock.h" |
| 46 #include "base/message_loop.h" | 46 #include "base/message_loop.h" |
| 47 #include "media/base/factory.h" |
| 47 #include "media/base/filters.h" | 48 #include "media/base/filters.h" |
| 48 #include "media/base/pipeline_impl.h" | 49 #include "media/base/pipeline_impl.h" |
| 49 #include "webkit/glue/webmediaplayer_delegate.h" | 50 #include "webkit/glue/webmediaplayer_delegate.h" |
| 50 | 51 |
| 51 class RenderView; | 52 class RenderView; |
| 52 class VideoRendererImpl; | 53 class VideoRendererImpl; |
| 53 | 54 |
| 54 namespace media { | |
| 55 class FilterFactoryCollection; | |
| 56 } | |
| 57 | |
| 58 // This typedef is used for WebMediaPlayerDelegateImpl::PostTask() and | 55 // This typedef is used for WebMediaPlayerDelegateImpl::PostTask() and |
| 59 // NotifyWebMediaPlayerTask in the source file. | 56 // NotifyWebMediaPlayerTask in the source file. |
| 60 typedef void (webkit_glue::WebMediaPlayer::*WebMediaPlayerMethod)(); | 57 typedef void (webkit_glue::WebMediaPlayer::*WebMediaPlayerMethod)(); |
| 61 | 58 |
| 62 class WebMediaPlayerDelegateImpl : public webkit_glue::WebMediaPlayerDelegate, | 59 class WebMediaPlayerDelegateImpl : public webkit_glue::WebMediaPlayerDelegate, |
| 63 public MessageLoop::DestructionObserver { | 60 public MessageLoop::DestructionObserver { |
| 64 public: | 61 public: |
| 65 explicit WebMediaPlayerDelegateImpl(RenderView* render_view); | 62 explicit WebMediaPlayerDelegateImpl(RenderView* render_view); |
| 66 virtual ~WebMediaPlayerDelegateImpl(); | 63 virtual ~WebMediaPlayerDelegateImpl(); |
| 67 | 64 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 // |main_loop_|. |tasks_| can be access from main thread or the media threads | 182 // |main_loop_|. |tasks_| can be access from main thread or the media threads |
| 186 // we need a lock for protecting it. | 183 // we need a lock for protecting it. |
| 187 Lock task_lock_; | 184 Lock task_lock_; |
| 188 typedef std::vector<CancelableTask*> CancelableTaskList; | 185 typedef std::vector<CancelableTask*> CancelableTaskList; |
| 189 CancelableTaskList tasks_; | 186 CancelableTaskList tasks_; |
| 190 | 187 |
| 191 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerDelegateImpl); | 188 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerDelegateImpl); |
| 192 }; | 189 }; |
| 193 | 190 |
| 194 #endif // ifndef CHROME_RENDERER_WEBMEDIAPLAYER_DELEGATE_IMPL_H_ | 191 #endif // ifndef CHROME_RENDERER_WEBMEDIAPLAYER_DELEGATE_IMPL_H_ |
| OLD | NEW |