| OLD | NEW |
| 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" |
| 11 #include "core/html/HTMLCanvasElement.h" | 11 #include "core/html/HTMLCanvasElement.h" |
| 12 #include "platform/geometry/IntSize.h" | 12 #include "platform/geometry/IntSize.h" |
| 13 #include "platform/heap/Handle.h" | 13 #include "platform/heap/Handle.h" |
| 14 | 14 |
| 15 namespace blink { | 15 namespace blink { |
| 16 | 16 |
| 17 class CanvasContextCreationAttributes; | 17 class CanvasContextCreationAttributes; |
| 18 class ImageBitmap; | 18 class ImageBitmap; |
| 19 class OffscreenCanvasRenderingContext2DOrWebGLRenderingContextOrWebGL2RenderingC
ontext; |
| 20 typedef OffscreenCanvasRenderingContext2DOrWebGLRenderingContextOrWebGL2Renderin
gContext OffscreenRenderingContext; |
| 19 | 21 |
| 20 class CORE_EXPORT OffscreenCanvas final : public GarbageCollectedFinalized<Offsc
reenCanvas>, public ScriptWrappable { | 22 class CORE_EXPORT OffscreenCanvas final : public GarbageCollectedFinalized<Offsc
reenCanvas>, public ScriptWrappable { |
| 21 DEFINE_WRAPPERTYPEINFO(); | 23 DEFINE_WRAPPERTYPEINFO(); |
| 22 public: | 24 public: |
| 23 static OffscreenCanvas* create(unsigned width, unsigned height); | 25 static OffscreenCanvas* create(unsigned width, unsigned height); |
| 24 ~OffscreenCanvas(); | 26 ~OffscreenCanvas(); |
| 25 | 27 |
| 26 // IDL attributes | 28 // IDL attributes |
| 27 unsigned width() const { return m_size.width(); } | 29 unsigned width() const { return m_size.width(); } |
| 28 unsigned height() const { return m_size.height(); } | 30 unsigned height() const { return m_size.height(); } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 49 static CanvasRenderingContextFactory* getRenderingContextFactory(int); | 51 static CanvasRenderingContextFactory* getRenderingContextFactory(int); |
| 50 | 52 |
| 51 Member<CanvasRenderingContext> m_context; | 53 Member<CanvasRenderingContext> m_context; |
| 52 WeakMember<HTMLCanvasElement> m_canvas; | 54 WeakMember<HTMLCanvasElement> m_canvas; |
| 53 IntSize m_size; | 55 IntSize m_size; |
| 54 }; | 56 }; |
| 55 | 57 |
| 56 } // namespace blink | 58 } // namespace blink |
| 57 | 59 |
| 58 #endif // OffscreenCanvas_h | 60 #endif // OffscreenCanvas_h |
| OLD | NEW |