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

Side by Side Diff: third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h

Issue 2490443002: Make OffscreenCanvas an EventTarget (Closed)
Patch Set: tests added Created 4 years, 1 month 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 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 169
170 bool wouldTaintOrigin(CanvasImageSource*, SecurityOrigin* = nullptr); 170 bool wouldTaintOrigin(CanvasImageSource*, SecurityOrigin* = nullptr);
171 void didMoveToNewDocument(Document*); 171 void didMoveToNewDocument(Document*);
172 172
173 void detachCanvas() { m_canvas = nullptr; } 173 void detachCanvas() { m_canvas = nullptr; }
174 174
175 const CanvasContextCreationAttributes& creationAttributes() const { 175 const CanvasContextCreationAttributes& creationAttributes() const {
176 return m_creationAttributes; 176 return m_creationAttributes;
177 } 177 }
178 178
179 // This method should be called on OffscreenCanvas's context only.
180 virtual ExecutionContext* getExecutionContext() {
181 NOTREACHED();
182 return nullptr;
183 }
184
179 protected: 185 protected:
180 CanvasRenderingContext(HTMLCanvasElement*, 186 CanvasRenderingContext(HTMLCanvasElement*,
181 OffscreenCanvas*, 187 OffscreenCanvas*,
182 const CanvasContextCreationAttributes&); 188 const CanvasContextCreationAttributes&);
183 DECLARE_VIRTUAL_TRACE(); 189 DECLARE_VIRTUAL_TRACE();
184 virtual void stop() = 0; 190 virtual void stop() = 0;
185 191
186 private: 192 private:
187 void dispose(); 193 void dispose();
188 194
189 Member<HTMLCanvasElement> m_canvas; 195 Member<HTMLCanvasElement> m_canvas;
190 Member<OffscreenCanvas> m_offscreenCanvas; 196 Member<OffscreenCanvas> m_offscreenCanvas;
191 HashSet<String> m_cleanURLs; 197 HashSet<String> m_cleanURLs;
192 HashSet<String> m_dirtyURLs; 198 HashSet<String> m_dirtyURLs;
193 CanvasColorSpace m_colorSpace; 199 CanvasColorSpace m_colorSpace;
194 CanvasContextCreationAttributes m_creationAttributes; 200 CanvasContextCreationAttributes m_creationAttributes;
195 }; 201 };
196 202
197 } // namespace blink 203 } // namespace blink
198 204
199 #endif 205 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698