diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/html/canvas/WebGLContextEvent.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/html/canvas/WebGLContextEvent.h')
-rw-r--r-- | Source/WebCore/html/canvas/WebGLContextEvent.h | 35 |
1 files changed, 13 insertions, 22 deletions
diff --git a/Source/WebCore/html/canvas/WebGLContextEvent.h b/Source/WebCore/html/canvas/WebGLContextEvent.h index fa1ebfbc8..4ba1ba4d7 100644 --- a/Source/WebCore/html/canvas/WebGLContextEvent.h +++ b/Source/WebCore/html/canvas/WebGLContextEvent.h @@ -23,47 +23,38 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef WebGLContextEvent_h -#define WebGLContextEvent_h +#pragma once #include "Event.h" namespace WebCore { -struct WebGLContextEventInit : public EventInit { - WebGLContextEventInit(); - - String statusMessage; -}; - -class WebGLContextEvent : public Event { +class WebGLContextEvent final : public Event { public: - static PassRefPtr<WebGLContextEvent> create() - { - return adoptRef(new WebGLContextEvent); - } - static PassRefPtr<WebGLContextEvent> create(const AtomicString& type, bool canBubble, bool cancelable, const String& statusMessage) + static Ref<WebGLContextEvent> create(const AtomicString& type, bool canBubble, bool cancelable, const String& statusMessage) { - return adoptRef(new WebGLContextEvent(type, canBubble, cancelable, statusMessage)); + return adoptRef(*new WebGLContextEvent(type, canBubble, cancelable, statusMessage)); } - static PassRefPtr<WebGLContextEvent> create(const AtomicString& type, const WebGLContextEventInit& initializer) + + struct Init : EventInit { + String statusMessage; + }; + + static Ref<WebGLContextEvent> create(const AtomicString& type, const Init& initializer, IsTrusted isTrusted = IsTrusted::No) { - return adoptRef(new WebGLContextEvent(type, initializer)); + return adoptRef(*new WebGLContextEvent(type, initializer, isTrusted)); } virtual ~WebGLContextEvent(); const String& statusMessage() const { return m_statusMessage; } - virtual EventInterface eventInterface() const override; + EventInterface eventInterface() const override; private: - WebGLContextEvent(); WebGLContextEvent(const AtomicString& type, bool canBubble, bool cancelable, const String& statusMessage); - WebGLContextEvent(const AtomicString&, const WebGLContextEventInit&); + WebGLContextEvent(const AtomicString&, const Init&, IsTrusted); String m_statusMessage; }; } // namespace WebCore - -#endif // WebGLContextEvent_h |