Index: third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h |
diff --git a/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h b/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h |
index f97398d3001858850fb96e32c7d8c873e1d3c044..949e11134e9fb9f59dd97983d573e2f570ba95a3 100644 |
--- a/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h |
+++ b/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h |
@@ -22,7 +22,7 @@ typedef OffscreenCanvasRenderingContext2DOrWebGLRenderingContextOrWebGL2Renderin |
class CORE_EXPORT OffscreenCanvas final : public GarbageCollected<OffscreenCanvas>, public ScriptWrappable { |
DEFINE_WRAPPERTYPEINFO(); |
public: |
- static OffscreenCanvas* create(unsigned width, unsigned height); |
+ static OffscreenCanvas* create(ExecutionContext*, unsigned width, unsigned height); |
// IDL attributes |
unsigned width() const { return m_size.width(); } |
@@ -43,19 +43,28 @@ public: |
static void registerRenderingContextFactory(PassOwnPtr<CanvasRenderingContextFactory>); |
+ SecurityOrigin* getSecurityOrigin() const; |
+ bool originClean() const; |
+ void setOriginTainted() { m_originClean = false; } |
+ |
+ ExecutionContext* getExecutionContext() const { return m_executionContext; } |
+ |
DECLARE_VIRTUAL_TRACE(); |
private: |
- explicit OffscreenCanvas(const IntSize&); |
+ explicit OffscreenCanvas(ExecutionContext*, const IntSize&); |
using ContextFactoryVector = Vector<OwnPtr<CanvasRenderingContextFactory>>; |
static ContextFactoryVector& renderingContextFactories(); |
static CanvasRenderingContextFactory* getRenderingContextFactory(int); |
Member<CanvasRenderingContext> m_context; |
+ Member<ExecutionContext> m_executionContext; |
int m_canvasId = -1; // DOMNodeIds starts from 0, using -1 to indicate no associated canvas element. |
IntSize m_size; |
bool m_isNeutered = false; |
+ |
+ bool m_originClean; |
}; |
} // namespace blink |