Chromium Code Reviews| Index: third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvas.h |
| diff --git a/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvas.h b/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvas.h |
| index 0e2e9575a340d55b1b397c6b257aad6e403f2d91..26c9baac0053c8cebf61ce127cccaa1ee6ace91f 100644 |
| --- a/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvas.h |
| +++ b/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvas.h |
| @@ -8,6 +8,7 @@ |
| #include "bindings/core/v8/ScriptPromise.h" |
| #include "bindings/core/v8/ScriptState.h" |
| #include "bindings/core/v8/ScriptWrappable.h" |
| +#include "core/html/HTMLCanvasElement.h" |
| #include "modules/ModulesExport.h" |
| #include "platform/geometry/IntSize.h" |
| #include "platform/heap/Handle.h" |
| @@ -38,6 +39,8 @@ public: |
| IntSize size() const { return m_size; } |
| OffscreenCanvasRenderingContext2D* renderingContext() const; |
| + void setAssociatedCanvas(HTMLCanvasElement* canvas) { m_canvas = canvas; } |
| + HTMLCanvasElement* getAssociatedCanvas() const { return m_canvas; } |
|
haraken
2016/04/01 14:28:44
Is this method used only by testing code? Or do yo
xidachen
2016/04/01 14:46:02
I believe that this method will be needed in a fut
haraken
2016/04/01 14:57:56
You need to HeapHashMap since HeapVector cannot co
|
| static void registerRenderingContextFactory(PassOwnPtr<OffscreenCanvasRenderingContextFactory>); |
| @@ -51,6 +54,7 @@ private: |
| static OffscreenCanvasRenderingContextFactory* getRenderingContextFactory(int); |
| Member<OffscreenCanvasRenderingContext> m_context; |
| + WeakMember<HTMLCanvasElement> m_canvas; |
|
haraken
2016/03/31 23:24:24
Would you elaborate on why this is WeakMember rath
|
| IntSize m_size; |
| }; |