Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Unified Diff: third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h

Issue 1881563003: Implement OffscreenCanvas.getContext('webgl') (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: offscreenCanvas.getContext('webgl') crashes on worker Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h
diff --git a/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h b/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h
index d3c80b8c053477cf38f97a2ec73e7b6240518047..434fc08a74cb458f44540be1d46a3e5bcce46b9d 100644
--- a/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h
+++ b/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h
@@ -5,6 +5,7 @@
#ifndef OffscreenCanvasRenderingContext2D_h
#define OffscreenCanvasRenderingContext2D_h
+#include "bindings/core/v8/ScriptState.h"
#include "core/html/canvas/CanvasContextCreationAttributes.h"
#include "modules/canvas2d/BaseRenderingContext2D.h"
#include "modules/offscreencanvas/OffscreenCanvasRenderingContext.h"
@@ -12,7 +13,7 @@
namespace blink {
-class MODULES_EXPORT OffscreenCanvasRenderingContext2D final : public OffscreenCanvasRenderingContext, public BaseRenderingContext2D {
+class MODULES_EXPORT OffscreenCanvasRenderingContext2D final : public GarbageCollectedFinalized<OffscreenCanvasRenderingContext2D>, public OffscreenCanvasRenderingContext, public BaseRenderingContext2D, public ScriptWrappable {
xlai (Olivia) 2016/04/20 20:42:16 Good change to move the ScriptWrappable. So now on
DEFINE_WRAPPERTYPEINFO();
USING_GARBAGE_COLLECTED_MIXIN(OffscreenCanvasRenderingContext2D);
public:
@@ -21,7 +22,7 @@ public:
Factory() {}
~Factory() override {}
- OffscreenCanvasRenderingContext* create(OffscreenCanvas* canvas, const CanvasContextCreationAttributes& attrs) override
+ OffscreenCanvasRenderingContext* create(ScriptState* scriptState, OffscreenCanvas* canvas, const CanvasContextCreationAttributes& attrs) override
{
return new OffscreenCanvasRenderingContext2D(canvas, attrs);
}
@@ -36,8 +37,9 @@ public:
// OffscreenCanvasRenderingContext implementation
~OffscreenCanvasRenderingContext2D() override;
- ContextType getContextType() const override { return Context2d; }
+ ContextType getOffscreenCanvasRenderingContextType() const override { return Context2d; }
bool is2d() const override { return true; }
+ void setOffscreenCanvasGetContextResult(OffscreenRenderingContext&) final;
// BaseRenderingContext2D implementation
bool originClean() const final;

Powered by Google App Engine
This is Rietveld 408576698