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