| OLD | NEW |
| 1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #ifndef VideoLayerChromium_h | 5 #ifndef VideoLayerChromium_h |
| 6 #define VideoLayerChromium_h | 6 #define VideoLayerChromium_h |
| 7 | 7 |
| 8 #include "base/callback.h" |
| 8 #include "cc/layer.h" | 9 #include "cc/layer.h" |
| 9 | 10 |
| 10 namespace WebKit { | 11 namespace WebKit { |
| 12 class WebVideoFrame; |
| 11 class WebVideoFrameProvider; | 13 class WebVideoFrameProvider; |
| 12 } | 14 } |
| 13 | 15 |
| 16 namespace media { |
| 17 class VideoFrame; |
| 18 } |
| 19 |
| 14 namespace cc { | 20 namespace cc { |
| 15 | 21 |
| 16 class VideoLayerImpl; | 22 class VideoLayerImpl; |
| 17 | 23 |
| 18 // A Layer that contains a Video element. | 24 // A Layer that contains a Video element. |
| 19 class VideoLayer : public Layer { | 25 class VideoLayer : public Layer { |
| 20 public: | 26 public: |
| 21 static scoped_refptr<VideoLayer> create(WebKit::WebVideoFrameProvider*); | 27 typedef base::Callback<media::VideoFrame* (WebKit::WebVideoFrame*)> FrameUnw
rapper; |
| 28 |
| 29 static scoped_refptr<VideoLayer> create(WebKit::WebVideoFrameProvider*, |
| 30 const FrameUnwrapper&); |
| 22 | 31 |
| 23 virtual scoped_ptr<LayerImpl> createLayerImpl() OVERRIDE; | 32 virtual scoped_ptr<LayerImpl> createLayerImpl() OVERRIDE; |
| 24 | 33 |
| 25 private: | 34 private: |
| 26 explicit VideoLayer(WebKit::WebVideoFrameProvider*); | 35 VideoLayer(WebKit::WebVideoFrameProvider*, const FrameUnwrapper&); |
| 27 virtual ~VideoLayer(); | 36 virtual ~VideoLayer(); |
| 28 | 37 |
| 29 // This pointer is only for passing to VideoLayerImpl's constructor. It shou
ld never be dereferenced by this class. | 38 // This pointer is only for passing to VideoLayerImpl's constructor. It shou
ld never be dereferenced by this class. |
| 30 WebKit::WebVideoFrameProvider* m_provider; | 39 WebKit::WebVideoFrameProvider* m_provider; |
| 40 FrameUnwrapper m_unwrapper; |
| 31 }; | 41 }; |
| 32 | 42 |
| 33 } | 43 } // namespace cc |
| 44 |
| 34 #endif | 45 #endif |
| OLD | NEW |