OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 #include "gfx/rect.h" | 62 #include "gfx/rect.h" |
63 #include "gfx/size.h" | 63 #include "gfx/size.h" |
64 #include "media/base/filters.h" | 64 #include "media/base/filters.h" |
65 #include "media/base/pipeline.h" | 65 #include "media/base/pipeline.h" |
66 #include "skia/ext/platform_canvas.h" | 66 #include "skia/ext/platform_canvas.h" |
67 #include "third_party/WebKit/WebKit/chromium/public/WebMediaPlayer.h" | 67 #include "third_party/WebKit/WebKit/chromium/public/WebMediaPlayer.h" |
68 #include "third_party/WebKit/WebKit/chromium/public/WebMediaPlayerClient.h" | 68 #include "third_party/WebKit/WebKit/chromium/public/WebMediaPlayerClient.h" |
69 | 69 |
70 class GURL; | 70 class GURL; |
71 | 71 |
| 72 namespace WebKit { |
| 73 class WebFrame; |
| 74 } |
| 75 |
72 namespace webkit_glue { | 76 namespace webkit_glue { |
73 | 77 |
74 class MediaResourceLoaderBridgeFactory; | 78 class MediaResourceLoaderBridgeFactory; |
75 class WebDataSource; | 79 class WebDataSource; |
76 class WebVideoRenderer; | 80 class WebVideoRenderer; |
77 | 81 |
78 class WebMediaPlayerImpl : public WebKit::WebMediaPlayer, | 82 class WebMediaPlayerImpl : public WebKit::WebMediaPlayer, |
79 public MessageLoop::DestructionObserver { | 83 public MessageLoop::DestructionObserver { |
80 public: | 84 public: |
81 // A proxy class that dispatches method calls from the media pipeline to | 85 // A proxy class that dispatches method calls from the media pipeline to |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 // 5. Null audio renderer | 168 // 5. Null audio renderer |
165 // The video renderer provided by this class is using the graphics context | 169 // The video renderer provided by this class is using the graphics context |
166 // provided by WebKit to perform renderering. The simple data source does | 170 // provided by WebKit to perform renderering. The simple data source does |
167 // resource loading by loading the whole resource object into memory. Null | 171 // resource loading by loading the whole resource object into memory. Null |
168 // audio renderer is a fake audio device that plays silence. Provider of the | 172 // audio renderer is a fake audio device that plays silence. Provider of the |
169 // |collection| can override the default filters by adding extra filters to | 173 // |collection| can override the default filters by adding extra filters to |
170 // |collection| before calling this method. | 174 // |collection| before calling this method. |
171 // | 175 // |
172 WebMediaPlayerImpl(WebKit::WebMediaPlayerClient* client, | 176 WebMediaPlayerImpl(WebKit::WebMediaPlayerClient* client, |
173 media::MediaFilterCollection* collection, | 177 media::MediaFilterCollection* collection, |
174 MediaResourceLoaderBridgeFactory* bridge_factory_simple, | 178 WebKit::WebFrame* frame, |
175 MediaResourceLoaderBridgeFactory* bridge_factory_buffered, | |
176 bool use_simple_data_source, | 179 bool use_simple_data_source, |
177 scoped_refptr<WebVideoRenderer> web_video_renderer); | 180 scoped_refptr<WebVideoRenderer> web_video_renderer); |
178 virtual ~WebMediaPlayerImpl(); | 181 virtual ~WebMediaPlayerImpl(); |
179 | 182 |
180 virtual void load(const WebKit::WebURL& url); | 183 virtual void load(const WebKit::WebURL& url); |
181 virtual void cancelLoad(); | 184 virtual void cancelLoad(); |
182 | 185 |
183 // Playback controls. | 186 // Playback controls. |
184 virtual void play(); | 187 virtual void play(); |
185 virtual void pause(); | 188 virtual void pause(); |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 #if WEBKIT_USING_CG | 316 #if WEBKIT_USING_CG |
314 scoped_ptr<skia::PlatformCanvas> skia_canvas_; | 317 scoped_ptr<skia::PlatformCanvas> skia_canvas_; |
315 #endif | 318 #endif |
316 | 319 |
317 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 320 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
318 }; | 321 }; |
319 | 322 |
320 } // namespace webkit_glue | 323 } // namespace webkit_glue |
321 | 324 |
322 #endif // WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_ | 325 #endif // WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_ |
OLD | NEW |