OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Delegate calls from WebCore::MediaPlayerPrivate to Chrome's video player. | 5 // Delegate calls from WebCore::MediaPlayerPrivate to Chrome'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 27 matching lines...) Expand all Loading... |
38 // other. This interdependency has to be treated carefully. | 38 // other. This interdependency has to be treated carefully. |
39 // | 39 // |
40 // Other issues: | 40 // Other issues: |
41 // During tear down of the whole browser or a tab, the DOM tree may not be | 41 // During tear down of the whole browser or a tab, the DOM tree may not be |
42 // destructed nicely, and there will be some dangling media threads trying to | 42 // destructed nicely, and there will be some dangling media threads trying to |
43 // the main thread, so we need this class to listen to destruction event of the | 43 // the main thread, so we need this class to listen to destruction event of the |
44 // main thread and cleanup the media threads when the even is received. Also | 44 // main thread and cleanup the media threads when the even is received. Also |
45 // at destruction of this class we will need to unhook it from destruction event | 45 // at destruction of this class we will need to unhook it from destruction event |
46 // list of the main thread. | 46 // list of the main thread. |
47 | 47 |
48 #ifndef WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_ | 48 #ifndef WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ |
49 #define WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_ | 49 #define WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ |
50 | 50 |
51 #include "base/memory/ref_counted.h" | 51 #include "base/memory/ref_counted.h" |
52 #include "base/memory/scoped_ptr.h" | 52 #include "base/memory/scoped_ptr.h" |
53 #include "base/memory/weak_ptr.h" | 53 #include "base/memory/weak_ptr.h" |
54 #include "base/message_loop.h" | 54 #include "base/message_loop.h" |
55 #include "media/base/filters.h" | 55 #include "media/base/filters.h" |
56 #include "media/base/message_loop_factory.h" | 56 #include "media/base/message_loop_factory.h" |
57 #include "media/base/pipeline.h" | 57 #include "media/base/pipeline.h" |
58 #include "skia/ext/platform_canvas.h" | 58 #include "skia/ext/platform_canvas.h" |
59 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h" | 59 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h" |
60 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerClient.
h" | 60 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerClient.
h" |
61 | 61 |
62 class GURL; | 62 class GURL; |
63 | 63 |
64 namespace WebKit { | 64 namespace WebKit { |
65 class WebFrame; | 65 class WebFrame; |
66 } | 66 } |
67 | 67 |
68 namespace media { | 68 namespace media { |
69 class MediaLog; | 69 class MediaLog; |
70 } | 70 } |
71 | 71 |
72 namespace webkit_glue { | 72 namespace webkit_media { |
73 | 73 |
74 class MediaResourceLoaderBridgeFactory; | 74 class MediaResourceLoaderBridgeFactory; |
75 class MediaStreamClient; | 75 class MediaStreamClient; |
76 class WebMediaPlayerDelegate; | 76 class WebMediaPlayerDelegate; |
77 class WebMediaPlayerProxy; | 77 class WebMediaPlayerProxy; |
78 class WebVideoRenderer; | 78 class WebVideoRenderer; |
79 | 79 |
80 class WebMediaPlayerImpl | 80 class WebMediaPlayerImpl |
81 : public WebKit::WebMediaPlayer, | 81 : public WebKit::WebMediaPlayer, |
82 public MessageLoop::DestructionObserver, | 82 public MessageLoop::DestructionObserver, |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 scoped_ptr<skia::PlatformCanvas> skia_canvas_; | 265 scoped_ptr<skia::PlatformCanvas> skia_canvas_; |
266 #endif | 266 #endif |
267 | 267 |
268 scoped_refptr<media::MediaLog> media_log_; | 268 scoped_refptr<media::MediaLog> media_log_; |
269 | 269 |
270 bool incremented_externally_allocated_memory_; | 270 bool incremented_externally_allocated_memory_; |
271 | 271 |
272 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 272 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
273 }; | 273 }; |
274 | 274 |
275 } // namespace webkit_glue | 275 } // namespace webkit_media |
276 | 276 |
277 #endif // WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_ | 277 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ |
OLD | NEW |