Chromium Code Reviews| Index: third_party/WebKit/Source/core/html/canvas/OffscreenCanvasRenderingContext.h |
| diff --git a/third_party/WebKit/Source/core/html/canvas/OffscreenCanvasRenderingContext.h b/third_party/WebKit/Source/core/html/canvas/OffscreenCanvasRenderingContext.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f474b6d1e60febdbee69454c72842ae4d49ab7b8 |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/core/html/canvas/OffscreenCanvasRenderingContext.h |
| @@ -0,0 +1,36 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "core/CoreExport.h" |
| +#include "core/html/canvas/OffscreenCanvas.h" |
| + |
| +namespace blink { |
| + |
| +class CORE_EXPORT OffscreenCanvasRenderingContext : public NoBaseWillBeGarbageCollectedFinalized<OffscreenCanvasRenderingContext>, public ScriptWrappable { |
|
Justin Novosad
2016/03/02 15:41:50
This class should also go in the new 'offscreencan
|
| +WTF_MAKE_NONCOPYABLE(OffscreenCanvasRenderingContext); |
| +USING_FAST_MALLOC_WILL_BE_REMOVED(OffscreenCanvasRenderingContext); |
| +public: |
| + virtual ~OffscreenCanvasRenderingContext() { } |
| + enum ContextType { |
| + Context2d = 0, |
| + ContextWebgl = 1, |
| + ContextWebgl2 = 2, |
| + ContextImageBitmap = 3, |
|
Justin Novosad
2016/03/02 15:41:50
ImageBitmap context will not be supported with Off
xlai (Olivia)
2016/03/03 22:50:06
Done.
|
| + ContextTypeCount |
| + }; |
| + static ContextType contextTypeFromId(const String& id); |
| + |
| + OffscreenCanvas* offscreenCanvas() const { return m_offscreenCanvas; } |
| + ContextType contextType() const { return m_contextType; } |
| + |
| +protected: |
| + OffscreenCanvasRenderingContext(OffscreenCanvas*); |
| + DECLARE_VIRTUAL_TRACE(); |
| + |
| +private: |
| + Member<OffscreenCanvas> m_offscreenCanvas; |
| + ContextType m_contextType; |
| +}; |
| + |
| +} // namespace blink |