Chromium Code Reviews| Index: third_party/WebKit/Source/modules/mediacapturefromelement/CanvasCaptureMediaStream.h |
| diff --git a/third_party/WebKit/Source/modules/mediacapturefromelement/CanvasCaptureMediaStream.h b/third_party/WebKit/Source/modules/mediacapturefromelement/CanvasCaptureMediaStream.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..89628adbb2daf2523dced381970d400d66ddd5c1 |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/modules/mediacapturefromelement/CanvasCaptureMediaStream.h |
| @@ -0,0 +1,35 @@ |
| +// 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 CanvasCaptureMediaStream_h |
| +#define CanvasCaptureMediaStream_h |
| + |
| +#include "core/html/canvas/CanvasDrawListener.h" |
| +#include "modules/mediastream/MediaStream.h" |
| +#include "platform/heap/Handle.h" |
| + |
| +namespace blink { |
| + |
| +class HTMLCanvasElement; |
| +class WebCanvasCaptureHandler; |
| + |
| +class CanvasCaptureMediaStream final : public MediaStream { |
| + DEFINE_WRAPPERTYPEINFO(); |
| + USING_GARBAGE_COLLECTED_MIXIN(CanvasCaptureMediaStream); |
| + |
| +public: |
| + static CanvasCaptureMediaStream* create(MediaStreamDescriptor*, PassRefPtrWillBeRawPtr<HTMLCanvasElement>, const PassOwnPtr<WebCanvasCaptureHandler>); |
| + DECLARE_VIRTUAL_TRACE(); |
| + HTMLCanvasElement* canvas() const; |
| + void requestFrame(); |
| + |
| +private: |
| + CanvasCaptureMediaStream(MediaStreamDescriptor*, PassRefPtrWillBeRawPtr<HTMLCanvasElement>, const PassOwnPtr<WebCanvasCaptureHandler>); |
| + RefPtrWillBeMember<HTMLCanvasElement> m_canvasElement; |
|
Justin Novosad
2015/11/25 02:38:05
This strong ref implies that the canvas, along wit
emircan
2015/11/26 01:03:52
The spec says that HTMLCanvasElement is a readonly
|
| + Member<CanvasDrawListener> m_drawListener; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif |