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

Unified Diff: third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h

Issue 1928043002: Add drawImage() originClean() getSecurityOrigin() to OffscreenCanvas (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/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 f97398d3001858850fb96e32c7d8c873e1d3c044..949e11134e9fb9f59dd97983d573e2f570ba95a3 100644
--- a/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h
+++ b/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h
@@ -22,7 +22,7 @@ typedef OffscreenCanvasRenderingContext2DOrWebGLRenderingContextOrWebGL2Renderin
class CORE_EXPORT OffscreenCanvas final : public GarbageCollected<OffscreenCanvas>, public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
public:
- static OffscreenCanvas* create(unsigned width, unsigned height);
+ static OffscreenCanvas* create(ExecutionContext*, unsigned width, unsigned height);
// IDL attributes
unsigned width() const { return m_size.width(); }
@@ -43,19 +43,28 @@ public:
static void registerRenderingContextFactory(PassOwnPtr<CanvasRenderingContextFactory>);
+ SecurityOrigin* getSecurityOrigin() const;
+ bool originClean() const;
+ void setOriginTainted() { m_originClean = false; }
+
+ ExecutionContext* getExecutionContext() const { return m_executionContext; }
+
DECLARE_VIRTUAL_TRACE();
private:
- explicit OffscreenCanvas(const IntSize&);
+ explicit OffscreenCanvas(ExecutionContext*, const IntSize&);
using ContextFactoryVector = Vector<OwnPtr<CanvasRenderingContextFactory>>;
static ContextFactoryVector& renderingContextFactories();
static CanvasRenderingContextFactory* getRenderingContextFactory(int);
Member<CanvasRenderingContext> m_context;
+ Member<ExecutionContext> m_executionContext;
int m_canvasId = -1; // DOMNodeIds starts from 0, using -1 to indicate no associated canvas element.
IntSize m_size;
bool m_isNeutered = false;
+
+ bool m_originClean;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698