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 "modules/ModulesExport.h"
10 #include "modules/push_messaging/PushMessageData.h"
11 #include "modules/serviceworkers/ExtendableEvent.h"
12 #include "platform/heap/Handle.h"
13 #include "wtf/text/AtomicString.h"
14 #include "wtf/text/WTFString.h"
20 class MODULES_EXPORT PushEvent final
: public ExtendableEvent
{
21 DEFINE_WRAPPERTYPEINFO();
23 static PassRefPtrWillBeRawPtr
<PushEvent
> create()
25 return adoptRefWillBeNoop(new PushEvent
);
27 static PassRefPtrWillBeRawPtr
<PushEvent
> create(const AtomicString
& type
, PushMessageData
* data
, WaitUntilObserver
* observer
)
29 return adoptRefWillBeNoop(new PushEvent(type
, data
, observer
));
31 static PassRefPtrWillBeRawPtr
<PushEvent
> create(const AtomicString
& type
, const PushEventInit
& initializer
)
33 return adoptRefWillBeNoop(new PushEvent(type
, initializer
));
36 ~PushEvent() override
;
38 const AtomicString
& interfaceName() const override
;
40 PushMessageData
* data();
42 DECLARE_VIRTUAL_TRACE();
46 PushEvent(const AtomicString
& type
, PushMessageData
*, WaitUntilObserver
*);
47 PushEvent(const AtomicString
& type
, const PushEventInit
&);
49 PersistentWillBeMember
<PushMessageData
> m_data
;