| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 WebCanvasCaptureHandler_h | 5 #ifndef WebCanvasCaptureHandler_h |
| 6 #define WebCanvasCaptureHandler_h | 6 #define WebCanvasCaptureHandler_h |
| 7 | 7 |
| 8 #include "WebCommon.h" | 8 #include "WebCommon.h" |
| 9 #include "WebMediaStreamTrack.h" |
| 10 #include "WebSize.h" |
| 9 | 11 |
| 10 class SkImage; | 12 class SkImage; |
| 11 | 13 |
| 12 namespace blink { | 14 namespace blink { |
| 13 | 15 |
| 14 // Platform interface of a CanvasCaptureHandler. | 16 // Platform interface of a CanvasCaptureHandler. |
| 15 class BLINK_PLATFORM_EXPORT WebCanvasCaptureHandler { | 17 class BLINK_PLATFORM_EXPORT WebCanvasCaptureHandler { |
| 16 public: | 18 public: |
| 17 virtual ~WebCanvasCaptureHandler() = default; | 19 virtual ~WebCanvasCaptureHandler() = default; |
| 20 virtual WebMediaStreamTrack createTrack(const WebSize& size, |
| 21 double frame_rate) = 0; |
| 18 virtual void sendNewFrame(const SkImage*) {} | 22 virtual void sendNewFrame(const SkImage*) {} |
| 19 virtual bool needsNewFrame() const { return false; } | 23 virtual bool needsNewFrame() const { return false; } |
| 20 }; | 24 }; |
| 21 | 25 |
| 22 } // namespace blink | 26 } // namespace blink |
| 23 | 27 |
| 24 #endif // WebMediaRecorderHandler_h | 28 #endif // WebCanvasCaptureHandler_h |
| OLD | NEW |