| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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 OffscreenCanvasRenderingContextFactory_h | 5 #ifndef OffscreenCanvasRenderingContextFactory_h |
| 6 #define OffscreenCanvasRenderingContextFactory_h | 6 #define OffscreenCanvasRenderingContextFactory_h |
| 7 | 7 |
| 8 #include "wtf/Allocator.h" | 8 #include "wtf/Allocator.h" |
| 9 #include "wtf/PassRefPtr.h" | 9 #include "wtf/PassRefPtr.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 class CanvasContextCreationAttributes; | 13 class CanvasContextCreationAttributes; |
| 14 class OffscreenCanvas; | 14 class OffscreenCanvas; |
| 15 class OffscreenCanvasRenderingContext; | 15 class OffscreenCanvasRenderingContext; |
| 16 | 16 |
| 17 class OffscreenCanvasRenderingContextFactory { | 17 class OffscreenCanvasRenderingContextFactory { |
| 18 USING_FAST_MALLOC(OffscreenCanvasRenderingContextFactory); | 18 USING_FAST_MALLOC(OffscreenCanvasRenderingContextFactory); |
| 19 WTF_MAKE_NONCOPYABLE(OffscreenCanvasRenderingContextFactory); | 19 WTF_MAKE_NONCOPYABLE(OffscreenCanvasRenderingContextFactory); |
| 20 public: | 20 public: |
| 21 OffscreenCanvasRenderingContextFactory() = default; | 21 OffscreenCanvasRenderingContextFactory() = default; |
| 22 virtual ~OffscreenCanvasRenderingContextFactory() { } | 22 virtual ~OffscreenCanvasRenderingContextFactory() { } |
| 23 | 23 |
| 24 virtual OffscreenCanvasRenderingContext* create(OffscreenCanvas*, const Canv
asContextCreationAttributes&) = 0; | 24 virtual OffscreenCanvasRenderingContext* create(OffscreenCanvas*, const Canv
asContextCreationAttributes&) = 0; |
| 25 virtual OffscreenCanvasRenderingContext::ContextType contextType() const = 0
; | 25 virtual OffscreenCanvasRenderingContext::ContextType getContextType() const
= 0; |
| 26 virtual void onError(OffscreenCanvas*, const String& error) = 0; | 26 virtual void onError(OffscreenCanvas*, const String& error) = 0; |
| 27 }; | 27 }; |
| 28 | 28 |
| 29 } // namespace blink | 29 } // namespace blink |
| 30 | 30 |
| 31 #endif // OffscreenCanvasRenderingContextFactory_h | 31 #endif // OffscreenCanvasRenderingContextFactory_h |
| OLD | NEW |