Chromium Code Reviews| Index: Source/core/html/HTMLCanvasElement.h |
| diff --git a/Source/core/html/HTMLCanvasElement.h b/Source/core/html/HTMLCanvasElement.h |
| index 88ab866e8a51534575039c07b19336efe0dfe468..90bdf5df77a4cbce22d2dcdc1ac7af97107e22eb 100644 |
| --- a/Source/core/html/HTMLCanvasElement.h |
| +++ b/Source/core/html/HTMLCanvasElement.h |
| @@ -29,6 +29,7 @@ |
| #define HTMLCanvasElement_h |
| #include "core/html/HTMLElement.h" |
| +#include "core/html/canvas/CanvasImageSource.h" |
| #include "platform/geometry/FloatRect.h" |
| #include "platform/geometry/IntSize.h" |
| #include "platform/graphics/Canvas2DLayerBridge.h" |
| @@ -59,7 +60,7 @@ public: |
| virtual void canvasDestroyed(HTMLCanvasElement*) = 0; |
| }; |
| -class HTMLCanvasElement FINAL : public HTMLElement, public DocumentVisibilityObserver { |
| +class HTMLCanvasElement FINAL : public HTMLElement, public DocumentVisibilityObserver, public CanvasImageSource { |
| public: |
| static PassRefPtr<HTMLCanvasElement> create(Document&); |
| virtual ~HTMLCanvasElement(); |
| @@ -116,7 +117,7 @@ public: |
| SecurityOrigin* securityOrigin() const; |
| void setOriginTainted() { m_originClean = false; } |
| - bool originClean() const { return m_originClean; } |
| + virtual bool originClean() const { return m_originClean; } |
|
Stephen White
2014/03/06 16:06:17
Nit: is this still necessary?
|
| AffineTransform baseTransform() const; |
| @@ -131,6 +132,11 @@ public: |
| // DocumentVisibilityObserver implementation |
| virtual void didChangeVisibilityState(PageVisibilityState) OVERRIDE; |
| + // CanvasImageSource implementation |
| + virtual PassRefPtr<Image> getSourceImageForCanvas(ExceptionState&, CanvasImageSourceUsage, bool* isVolatile) const OVERRIDE; |
| + virtual bool wouldTaintOrigin(SecurityOrigin*) const OVERRIDE; |
| + virtual FloatSize sourceSize() const OVERRIDE; |
| + |
| protected: |
| virtual void didMoveToNewDocument(Document& oldDocument) OVERRIDE; |