Chromium Code Reviews| 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 39dfe40d0b77c3736d9e45649969fa9d9e1c0032..978ad45d03d95f9ed4361367cf6eda716aa87565 100644 |
| --- a/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h |
| +++ b/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h |
| @@ -32,9 +32,12 @@ public: |
| ImageBitmap* transferToImageBitmap(ExceptionState&); |
| IntSize size() const { return m_size; } |
| - void setAssociatedCanvas(HTMLCanvasElement* canvas) { m_canvas = canvas; } |
| - HTMLCanvasElement* getAssociatedCanvas() const { return m_canvas; } |
| + void setAssociatedCanvasId(int canvasId) { m_canvasId = canvasId; } |
|
Justin Novosad
2016/04/26 20:08:32
I do not see any tests that verify that transfered
xidachen
2016/04/26 20:40:59
Per offline discussion: this ID will be verified o
|
| + int getAssociatedCanvasId() const { return m_canvasId; } |
| + bool isNeutered() const { return m_isNeutered; } |
| + void setNeutered(); |
| CanvasRenderingContext* getCanvasRenderingContext(const String&, const CanvasContextCreationAttributes&); |
| + CanvasRenderingContext* renderingContext() { return m_context.get(); } |
| static void registerRenderingContextFactory(PassOwnPtr<CanvasRenderingContextFactory>); |
| @@ -48,8 +51,9 @@ private: |
| static CanvasRenderingContextFactory* getRenderingContextFactory(int); |
| Member<CanvasRenderingContext> m_context; |
| - WeakMember<HTMLCanvasElement> m_canvas; |
| + int m_canvasId = -1; // DOMNodeIds starts from 0, using -1 to indicate no associated canvas element. |
| IntSize m_size; |
| + bool m_isNeutered = false; |
| }; |
| } // namespace blink |