OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CanvasCaptureMediaStream_h | |
6 #define CanvasCaptureMediaStream_h | |
7 | |
8 #include "core/html/canvas/CanvasDrawListener.h" | |
9 #include "modules/mediastream/MediaStream.h" | |
10 #include "platform/heap/Handle.h" | |
11 | |
12 namespace blink { | |
13 | |
14 class HTMLCanvasElement; | |
15 class WebCanvasCaptureHandler; | |
16 | |
17 class CanvasCaptureMediaStream final : public MediaStream { | |
18 DEFINE_WRAPPERTYPEINFO(); | |
19 | |
20 public: | |
21 static CanvasCaptureMediaStream* create(MediaStreamDescriptor*, PassRefPtrWi
llBeRawPtr<HTMLCanvasElement>); | |
22 static CanvasCaptureMediaStream* create(MediaStreamDescriptor*, PassRefPtrWi
llBeRawPtr<HTMLCanvasElement>, const PassOwnPtr<WebCanvasCaptureHandler>); | |
23 DECLARE_VIRTUAL_TRACE(); | |
24 HTMLCanvasElement* canvas() const; | |
25 void requestFrame(); | |
26 | |
27 private: | |
28 CanvasCaptureMediaStream(MediaStreamDescriptor*, PassRefPtrWillBeRawPtr<HTML
CanvasElement>); | |
29 void initialize(const PassOwnPtr<WebCanvasCaptureHandler>); | |
30 | |
31 RefPtrWillBeMember<HTMLCanvasElement> m_canvasElement; | |
32 Member<CanvasDrawListener> m_drawListener; | |
33 }; | |
34 | |
35 } // namespace blink | |
36 | |
37 #endif | |
OLD | NEW |