summaryrefslogtreecommitdiff
path: root/Source/WebCore/html/canvas/WebGLContextEvent.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/html/canvas/WebGLContextEvent.h')
-rw-r--r--Source/WebCore/html/canvas/WebGLContextEvent.h35
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