Index: third_party/WebKit/Source/core/html/canvas/OffscreenCanvas.h |
diff --git a/third_party/WebKit/Source/core/html/canvas/OffscreenCanvas.h b/third_party/WebKit/Source/core/html/canvas/OffscreenCanvas.h |
index a9a14b258f0d9d592f2e886709f52d3fa3fca45d..dd3f64884c6c9503a7e59cb5cc71af025adfa389 100644 |
--- a/third_party/WebKit/Source/core/html/canvas/OffscreenCanvas.h |
+++ b/third_party/WebKit/Source/core/html/canvas/OffscreenCanvas.h |
@@ -14,6 +14,10 @@ |
namespace blink { |
+class CanvasContextCreationAttributes; |
Justin Novosad
2016/03/02 15:41:50
The Blink core has no dependency on OffscreenCanva
|
+class OffscreenCanvasRenderingContext; |
+class OffscreenCanvasRenderingContextFactory; |
+ |
class CORE_EXPORT OffscreenCanvas final : public GarbageCollectedFinalized<OffscreenCanvas>, public ScriptWrappable { |
DEFINE_WRAPPERTYPEINFO(); |
public: |
@@ -22,15 +26,24 @@ public: |
IntSize size() const { return m_size; } |
unsigned width() const { return m_size.width(); } |
unsigned height() const { return m_size.height(); } |
- |
void setWidth(unsigned); |
void setHeight(unsigned); |
+ OffscreenCanvasRenderingContext* getContext(const String&, const CanvasContextCreationAttributes&); |
+ OffscreenCanvasRenderingContext* renderingContext() const { return m_context.get(); } |
+ |
+ static void registerRenderingContextFactory(PassOwnPtr<OffscreenCanvasRenderingContextFactory>); |
+ |
DECLARE_VIRTUAL_TRACE(); |
private: |
OffscreenCanvas(const IntSize&); |
+ using ContextFactoryVector = Vector<OwnPtr<OffscreenCanvasRenderingContextFactory>>; |
+ static ContextFactoryVector& renderingContextFactories(); |
+ static OffscreenCanvasRenderingContextFactory* getRenderingContextFactory(int); |
+ |
+ OwnPtrWillBeMember<OffscreenCanvasRenderingContext> m_context; |
IntSize m_size; |
}; |