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 | |
76 namespace webkit_glue { | 72 namespace webkit_glue { |
77 | 73 |
78 class MediaResourceLoaderBridgeFactory; | 74 class MediaResourceLoaderBridgeFactory; |
79 class WebDataSource; | 75 class WebDataSource; |
80 class WebVideoRenderer; | 76 class WebVideoRenderer; |
81 | 77 |
82 class WebMediaPlayerImpl : public WebKit::WebMediaPlayer, | 78 class WebMediaPlayerImpl : public WebKit::WebMediaPlayer, |
83 public MessageLoop::DestructionObserver { | 79 public MessageLoop::DestructionObserver { |
84 public: | 80 public: |
85 // A proxy class that dispatches method calls from the media pipeline to | 81 // A proxy class that dispatches method calls from the media pipeline to |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 // |collection| can override the default filters by adding extra filters to | 169 // |collection| can override the default filters by adding extra filters to |
174 // |collection| before calling this method. | 170 // |collection| before calling this method. |
175 // | 171 // |
176 // Callers must call |Initialize()| before they can use the object. | 172 // Callers must call |Initialize()| before they can use the object. |
177 WebMediaPlayerImpl(WebKit::WebMediaPlayerClient* client, | 173 WebMediaPlayerImpl(WebKit::WebMediaPlayerClient* client, |
178 media::FilterCollection* collection); | 174 media::FilterCollection* collection); |
179 virtual ~WebMediaPlayerImpl(); | 175 virtual ~WebMediaPlayerImpl(); |
180 | 176 |
181 // Finalizes initialization of the object. | 177 // Finalizes initialization of the object. |
182 bool Initialize( | 178 bool Initialize( |
183 WebKit::WebFrame* frame, | 179 MediaResourceLoaderBridgeFactory* bridge_factory_simple, |
| 180 MediaResourceLoaderBridgeFactory* bridge_factory_buffered, |
184 bool use_simple_data_source, | 181 bool use_simple_data_source, |
185 scoped_refptr<WebVideoRenderer> web_video_renderer); | 182 scoped_refptr<WebVideoRenderer> web_video_renderer); |
186 | 183 |
187 virtual void load(const WebKit::WebURL& url); | 184 virtual void load(const WebKit::WebURL& url); |
188 virtual void cancelLoad(); | 185 virtual void cancelLoad(); |
189 | 186 |
190 // Playback controls. | 187 // Playback controls. |
191 virtual void play(); | 188 virtual void play(); |
192 virtual void pause(); | 189 virtual void pause(); |
193 virtual bool supportsFullscreen() const; | 190 virtual bool supportsFullscreen() const; |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 #if WEBKIT_USING_CG | 317 #if WEBKIT_USING_CG |
321 scoped_ptr<skia::PlatformCanvas> skia_canvas_; | 318 scoped_ptr<skia::PlatformCanvas> skia_canvas_; |
322 #endif | 319 #endif |
323 | 320 |
324 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 321 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
325 }; | 322 }; |
326 | 323 |
327 } // namespace webkit_glue | 324 } // namespace webkit_glue |
328 | 325 |
329 #endif // WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_ | 326 #endif // WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_ |
OLD | NEW |