OLD | NEW |
---|---|
(Empty) | |
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. | |
4 | |
5 #ifndef PushEvent_h | |
6 #define PushEvent_h | |
7 | |
8 #include "core/events/Event.h" | |
9 | |
Peter Beverloo
2014/05/16 15:41:43
IWYU please
Michael van Ouwerkerk
2014/05/21 17:06:42
Done.
| |
10 namespace WebCore { | |
11 | |
12 struct PushEventInit : public EventInit { | |
13 PushEventInit(); | |
14 | |
15 String data; | |
16 }; | |
17 | |
18 class PushEvent FINAL : public Event { | |
19 public: | |
20 static PassRefPtr<PushEvent> create() | |
Peter Beverloo
2014/05/16 15:41:43
PassRefPtrWillBeRawPtr (elsewhere too)
Michael van Ouwerkerk
2014/05/21 17:06:42
Done.
| |
21 { | |
22 return adoptRef(new PushEvent); | |
Peter Beverloo
2014/05/16 15:41:43
adoptRefWillBeNoop (elsewhere too)
Michael van Ouwerkerk
2014/05/21 17:06:42
Done.
| |
23 } | |
24 static PassRefPtr<PushEvent> create(const AtomicString& type, const String& data) | |
25 { | |
26 return adoptRef(new PushEvent(type, data)); | |
27 } | |
28 static PassRefPtr<PushEvent> create(const AtomicString& type, const PushEven tInit& initializer) | |
29 { | |
30 return adoptRef(new PushEvent(type, initializer)); | |
31 } | |
32 | |
33 virtual ~PushEvent(); | |
34 | |
35 virtual const AtomicString& interfaceName() const OVERRIDE; | |
36 | |
37 String data() const { return m_data; } | |
38 | |
Peter Beverloo
2014/05/16 15:41:43
Hmm. Most other Event implementations override the
Michael van Ouwerkerk
2014/05/21 17:06:42
Ok.
| |
39 private: | |
40 PushEvent(); | |
41 PushEvent(const AtomicString& type, const String& data); | |
42 PushEvent(const AtomicString&, const PushEventInit&); | |
Peter Beverloo
2014/05/16 15:41:43
Please name the first argument (since AtomicString
Michael van Ouwerkerk
2014/05/21 17:06:42
Done.
| |
43 String m_data; | |
44 }; | |
45 | |
46 } // namespace WebCore | |
47 | |
48 #endif // PushEvent_h | |
OLD | NEW |