| Index: third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvasRenderingContext.h
|
| diff --git a/third_party/WebKit/Source/core/events/InputEvent.h b/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvasRenderingContext.h
|
| similarity index 21%
|
| copy from third_party/WebKit/Source/core/events/InputEvent.h
|
| copy to third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvasRenderingContext.h
|
| index f6c46ae58d23d1c655b4c72059353d8d97b9a273..b47aa089a7be554fa90ce21bb7ad524bf827ab30 100644
|
| --- a/third_party/WebKit/Source/core/events/InputEvent.h
|
| +++ b/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvasRenderingContext.h
|
| @@ -2,39 +2,39 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef InputEvent_h
|
| -#define InputEvent_h
|
| +#ifndef OffscreenCanvasRenderingContext_h
|
| +#define OffscreenCanvasRenderingContext_h
|
|
|
| -#include "core/events/InputEventInit.h"
|
| -#include "core/events/UIEvent.h"
|
| +#include "modules/ModulesExport.h"
|
| +#include "modules/offscreencanvas/OffscreenCanvas.h"
|
|
|
| namespace blink {
|
|
|
| -class InputEvent final : public UIEvent {
|
| - DEFINE_WRAPPERTYPEINFO();
|
| -
|
| +class MODULES_EXPORT OffscreenCanvasRenderingContext : public GarbageCollectedFinalized<OffscreenCanvasRenderingContext>, public ScriptWrappable {
|
| + WTF_MAKE_NONCOPYABLE(OffscreenCanvasRenderingContext);
|
| public:
|
| - static PassRefPtrWillBeRawPtr<InputEvent> create()
|
| - {
|
| - return adoptRefWillBeNoop(new InputEvent);
|
| - }
|
| -
|
| - static PassRefPtrWillBeRawPtr<InputEvent> create(const AtomicString& type, const InputEventInit& initializer)
|
| - {
|
| - return adoptRefWillBeNoop(new InputEvent(type, initializer));
|
| - }
|
| -
|
| - bool isInputEvent() const override;
|
| -
|
| + virtual ~OffscreenCanvasRenderingContext() { }
|
| + enum ContextType {
|
| + Context2d = 0,
|
| + ContextWebgl = 1,
|
| + ContextWebgl2 = 2,
|
| + ContextTypeCount
|
| + };
|
| + static ContextType contextTypeFromId(const String& id);
|
| +
|
| + OffscreenCanvas* offscreenCanvas() const { return m_offscreenCanvas; }
|
| + virtual ContextType contextType() const = 0;
|
| +
|
| + virtual bool is2d() const { return false; }
|
| +
|
| +protected:
|
| + OffscreenCanvasRenderingContext(OffscreenCanvas*);
|
| DECLARE_VIRTUAL_TRACE();
|
|
|
| private:
|
| - InputEvent();
|
| - InputEvent(const AtomicString&, const InputEventInit&);
|
| + Member<OffscreenCanvas> m_offscreenCanvas;
|
| };
|
|
|
| -DEFINE_EVENT_TYPE_CASTS(InputEvent);
|
| -
|
| } // namespace blink
|
|
|
| -#endif // InputEvent_h
|
| +#endif // OffscreenCanvasRenderingContext_h
|
|
|