OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "modules/push_messaging/PushEvent.h" | 5 #include "modules/push_messaging/PushEvent.h" |
6 | 6 |
7 #include "modules/push_messaging/PushEventInit.h" | 7 #include "modules/push_messaging/PushEventInit.h" |
8 | 8 |
9 namespace blink { | 9 namespace blink { |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 { | 29 { |
30 } | 30 } |
31 | 31 |
32 const AtomicString& PushEvent::interfaceName() const | 32 const AtomicString& PushEvent::interfaceName() const |
33 { | 33 { |
34 return EventNames::PushEvent; | 34 return EventNames::PushEvent; |
35 } | 35 } |
36 | 36 |
37 PushMessageData* PushEvent::data() | 37 PushMessageData* PushEvent::data() |
38 { | 38 { |
39 if (!m_data) | |
40 m_data = PushMessageData::create(); | |
41 | |
42 return m_data.get(); | 39 return m_data.get(); |
43 } | 40 } |
44 | 41 |
45 DEFINE_TRACE(PushEvent) | 42 DEFINE_TRACE(PushEvent) |
46 { | 43 { |
47 visitor->trace(m_data); | 44 visitor->trace(m_data); |
48 ExtendableEvent::trace(visitor); | 45 ExtendableEvent::trace(visitor); |
49 } | 46 } |
50 | 47 |
51 } // namespace blink | 48 } // namespace blink |
OLD | NEW |