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

Side by Side 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: Put back CallWith=ScriptState Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef OffscreenCanvas_h 5 #ifndef OffscreenCanvas_h
6 #define OffscreenCanvas_h 6 #define OffscreenCanvas_h
7 7
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptState.h" 9 #include "bindings/core/v8/ScriptState.h"
10 #include "bindings/core/v8/ScriptWrappable.h" 10 #include "bindings/core/v8/ScriptWrappable.h"
(...skipping 25 matching lines...) Expand all
36 IntSize size() const { return m_size; } 36 IntSize size() const { return m_size; }
37 void setAssociatedCanvasId(int canvasId) { m_canvasId = canvasId; } 37 void setAssociatedCanvasId(int canvasId) { m_canvasId = canvasId; }
38 int getAssociatedCanvasId() const { return m_canvasId; } 38 int getAssociatedCanvasId() const { return m_canvasId; }
39 bool isNeutered() const { return m_isNeutered; } 39 bool isNeutered() const { return m_isNeutered; }
40 void setNeutered(); 40 void setNeutered();
41 CanvasRenderingContext* getCanvasRenderingContext(ScriptState*, const String &, const CanvasContextCreationAttributes&); 41 CanvasRenderingContext* getCanvasRenderingContext(ScriptState*, const String &, const CanvasContextCreationAttributes&);
42 CanvasRenderingContext* renderingContext() { return m_context; } 42 CanvasRenderingContext* renderingContext() { return m_context; }
43 43
44 static void registerRenderingContextFactory(PassOwnPtr<CanvasRenderingContex tFactory>); 44 static void registerRenderingContextFactory(PassOwnPtr<CanvasRenderingContex tFactory>);
45 45
46 SecurityOrigin* getSecurityOrigin(ScriptState*) const;
47 bool originClean() const;
48 void setOriginTainted() { m_originClean = false; }
49
46 DECLARE_VIRTUAL_TRACE(); 50 DECLARE_VIRTUAL_TRACE();
47 51
48 private: 52 private:
49 explicit OffscreenCanvas(const IntSize&); 53 explicit OffscreenCanvas(const IntSize&);
50 54
51 using ContextFactoryVector = Vector<OwnPtr<CanvasRenderingContextFactory>>; 55 using ContextFactoryVector = Vector<OwnPtr<CanvasRenderingContextFactory>>;
52 static ContextFactoryVector& renderingContextFactories(); 56 static ContextFactoryVector& renderingContextFactories();
53 static CanvasRenderingContextFactory* getRenderingContextFactory(int); 57 static CanvasRenderingContextFactory* getRenderingContextFactory(int);
54 58
55 Member<CanvasRenderingContext> m_context; 59 Member<CanvasRenderingContext> m_context;
56 int m_canvasId = -1; // DOMNodeIds starts from 0, using -1 to indicate no as sociated canvas element. 60 int m_canvasId = -1; // DOMNodeIds starts from 0, using -1 to indicate no as sociated canvas element.
57 IntSize m_size; 61 IntSize m_size;
58 bool m_isNeutered = false; 62 bool m_isNeutered = false;
63
64 bool m_originClean;
59 }; 65 };
60 66
61 } // namespace blink 67 } // namespace blink
62 68
63 #endif // OffscreenCanvas_h 69 #endif // OffscreenCanvas_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698