| Index: third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvas.h
|
| diff --git a/third_party/WebKit/Source/core/html/canvas/OffscreenCanvas.h b/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvas.h
|
| similarity index 50%
|
| rename from third_party/WebKit/Source/core/html/canvas/OffscreenCanvas.h
|
| rename to third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvas.h
|
| index a9a14b258f0d9d592f2e886709f52d3fa3fca45d..abfc4194fb319505260021989cd756d7547d6d99 100644
|
| --- a/third_party/WebKit/Source/core/html/canvas/OffscreenCanvas.h
|
| +++ b/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvas.h
|
| @@ -8,29 +8,44 @@
|
| #include "bindings/core/v8/ScriptPromise.h"
|
| #include "bindings/core/v8/ScriptState.h"
|
| #include "bindings/core/v8/ScriptWrappable.h"
|
| -#include "core/CoreExport.h"
|
| +#include "modules/ModulesExport.h"
|
| #include "platform/geometry/IntSize.h"
|
| #include "platform/heap/Handle.h"
|
|
|
| namespace blink {
|
|
|
| -class CORE_EXPORT OffscreenCanvas final : public GarbageCollectedFinalized<OffscreenCanvas>, public ScriptWrappable {
|
| +class CanvasContextCreationAttributes;
|
| +class OffscreenCanvasRenderingContext;
|
| +class OffscreenCanvasRenderingContext2D;
|
| +class OffscreenCanvasRenderingContextFactory;
|
| +
|
| +class MODULES_EXPORT OffscreenCanvas final : public GarbageCollectedFinalized<OffscreenCanvas>, public ScriptWrappable {
|
| DEFINE_WRAPPERTYPEINFO();
|
| public:
|
| static OffscreenCanvas* create(unsigned width, unsigned height);
|
| + ~OffscreenCanvas() {}
|
|
|
| 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);
|
|
|
| + OffscreenCanvasRenderingContext2D* getContext(const String&, const CanvasContextCreationAttributes&);
|
| + OffscreenCanvasRenderingContext2D* renderingContext() const;
|
| +
|
| + static void registerRenderingContextFactory(PassOwnPtr<OffscreenCanvasRenderingContextFactory>);
|
| +
|
| DECLARE_VIRTUAL_TRACE();
|
|
|
| private:
|
| OffscreenCanvas(const IntSize&);
|
|
|
| + using ContextFactoryVector = Vector<OwnPtr<OffscreenCanvasRenderingContextFactory>>;
|
| + static ContextFactoryVector& renderingContextFactories();
|
| + static OffscreenCanvasRenderingContextFactory* getRenderingContextFactory(int);
|
| +
|
| + Member<OffscreenCanvasRenderingContext> m_context;
|
| IntSize m_size;
|
| };
|
|
|
|
|