Chromium Code Reviews| Index: third_party/WebKit/Source/core/html/HTMLCanvasElement.h |
| diff --git a/third_party/WebKit/Source/core/html/HTMLCanvasElement.h b/third_party/WebKit/Source/core/html/HTMLCanvasElement.h |
| index f208f37cd8c8b58d3b37059210374440d256c221..cbaf7f7eea3253656a400f425148c75179354500 100644 |
| --- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.h |
| +++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.h |
| @@ -36,6 +36,7 @@ |
| #include "core/dom/DocumentVisibilityObserver.h" |
| #include "core/fileapi/FileCallback.h" |
| #include "core/html/HTMLElement.h" |
| +#include "core/html/canvas/CanvasDrawListener.h" |
| #include "core/html/canvas/CanvasImageSource.h" |
| #include "core/imagebitmap/ImageBitmapSource.h" |
| #include "platform/geometry/FloatRect.h" |
| @@ -61,7 +62,7 @@ class ImageBufferSurface; |
| class ImageData; |
| class IntSize; |
| -class CORE_EXPORT HTMLCanvasElement final : public HTMLElement, public DocumentVisibilityObserver, public CanvasImageSource, public ImageBufferClient, public ImageBitmapSource { |
| +class CORE_EXPORT HTMLCanvasElement : public HTMLElement, public DocumentVisibilityObserver, public CanvasImageSource, public ImageBufferClient, public ImageBitmapSource { |
|
esprehn
2015/12/01 20:04:26
why did you remove final?
emircan
2015/12/01 21:07:34
modules/mediacapturefromelement/HTMLCanvasElementC
|
| DEFINE_WRAPPERTYPEINFO(); |
| WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(HTMLCanvasElement); |
| public: |
| @@ -102,6 +103,10 @@ public: |
| void toBlob(FileCallback*, const String& mimeType, const ScriptValue& qualityArgument, ExceptionState&); |
| void toBlob(FileCallback* callback, const String& mimeType, ExceptionState& exceptionState) { return toBlob(callback, mimeType, ScriptValue(), exceptionState); } |
| + // Used for canvas capture. |
| + void addListener(CanvasDrawListener*); |
| + void removeListener(CanvasDrawListener*); |
| + |
| // Used for rendering |
| void didDraw(const FloatRect&); |
| @@ -198,9 +203,13 @@ private: |
| bool paintsIntoCanvasBuffer() const; |
| + void notifyListenersCanvasChanged(); |
| + |
| ImageData* toImageData(SourceDrawingBuffer) const; |
| String toDataURLInternal(const String& mimeType, const double& quality, SourceDrawingBuffer) const; |
| + PersistentHeapHashSetWillBeHeapHashSet<WeakMember<CanvasDrawListener>> m_listeners; |
| + |
| IntSize m_size; |
| OwnPtrWillBeMember<CanvasRenderingContext> m_context; |