Chromium Code Reviews| Index: third_party/WebKit/Source/modules/mediacapturefromelement/TimedCanvasDrawListener.h |
| diff --git a/third_party/WebKit/Source/modules/mediacapturefromelement/TimedCanvasDrawListener.h b/third_party/WebKit/Source/modules/mediacapturefromelement/TimedCanvasDrawListener.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9007da87d7427d0b9b73ebd6bd337f5055b1969b |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/modules/mediacapturefromelement/TimedCanvasDrawListener.h |
| @@ -0,0 +1,33 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef TimedCanvasDrawListener_h |
| +#define TimedCanvasDrawListener_h |
| + |
| +#include "core/html/canvas/CanvasDrawListener.h" |
| +#include "platform/heap/Handle.h" |
| +#include "public/platform/WebCanvasCaptureHandler.h" |
| + |
| +namespace blink { |
| + |
| +class TimedCanvasDrawListener final : public GarbageCollectedFinalized<TimedCanvasDrawListener>, public CanvasDrawListener { |
| + USING_GARBAGE_COLLECTED_MIXIN(TimedCanvasDrawListener); |
| +public: |
| + static TimedCanvasDrawListener* create(const PassOwnPtr<WebCanvasCaptureHandler>&, double frameRate); |
| + ~TimedCanvasDrawListener() {} |
|
esprehn
2015/12/11 10:38:24
out of line
emircan
2015/12/11 19:25:16
Done.
|
| + bool needsNewFrame() const override; |
| + void sendNewFrame(const WTF::PassRefPtr<SkImage>&) override; |
| + |
| + DEFINE_INLINE_TRACE() {} |
| +private: |
| + TimedCanvasDrawListener(const PassOwnPtr<WebCanvasCaptureHandler>&, double frameRate); |
| + void requestNewFrame(); |
| + |
| + double m_frameInterval; |
| + bool m_requestFrame; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif |