1 // Copyright 2014 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.
8 #include "modules/EventModules.h"
9 #include "platform/heap/Handle.h"
10 #include "wtf/text/AtomicString.h"
11 #include "wtf/text/WTFString.h"
15 struct PushEventInit : public EventInit {
21 class PushEvent FINAL : public Event {
22 DEFINE_WRAPPERTYPEINFO();
24 static PassRefPtrWillBeRawPtr<PushEvent> create()
26 return adoptRefWillBeNoop(new PushEvent);
28 static PassRefPtrWillBeRawPtr<PushEvent> create(const AtomicString& type, const String& data)
30 return adoptRefWillBeNoop(new PushEvent(type, data));
32 static PassRefPtrWillBeRawPtr<PushEvent> create(const AtomicString& type, const PushEventInit& initializer)
34 return adoptRefWillBeNoop(new PushEvent(type, initializer));
39 virtual const AtomicString& interfaceName() const OVERRIDE;
41 String data() const { return m_data; }
45 PushEvent(const AtomicString& type, const String& data);
46 PushEvent(const AtomicString& type, const PushEventInit&);