| 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 #ifndef GeofencingEvent_h | 5 #ifndef GeofencingEvent_h |
| 6 #define GeofencingEvent_h | 6 #define GeofencingEvent_h |
| 7 | 7 |
| 8 #include "modules/EventModules.h" | 8 #include "modules/EventModules.h" |
| 9 #include "modules/ModulesExport.h" | 9 #include "modules/ModulesExport.h" |
| 10 #include "modules/geofencing/GeofencingRegion.h" | 10 #include "modules/geofencing/GeofencingRegion.h" |
| 11 #include "platform/heap/Handle.h" | 11 #include "platform/heap/Handle.h" |
| 12 #include "wtf/text/AtomicString.h" | 12 #include "wtf/text/AtomicString.h" |
| 13 #include "wtf/text/WTFString.h" | 13 #include "wtf/text/WTFString.h" |
| 14 | 14 |
| 15 namespace blink { | 15 namespace blink { |
| 16 | 16 |
| 17 class GeofencingRegion; | 17 class GeofencingRegion; |
| 18 | 18 |
| 19 // FIXME: This should derive from ExtendableEvent. | 19 // FIXME: This should derive from ExtendableEvent. |
| 20 class MODULES_EXPORT GeofencingEvent final : public Event { | 20 class MODULES_EXPORT GeofencingEvent final : public Event { |
| 21 DEFINE_WRAPPERTYPEINFO(); | 21 DEFINE_WRAPPERTYPEINFO(); |
| 22 public: | 22 public: |
| 23 static PassRefPtrWillBeRawPtr<GeofencingEvent> create() | 23 static RawPtr<GeofencingEvent> create() |
| 24 { | 24 { |
| 25 return adoptRefWillBeNoop(new GeofencingEvent); | 25 return adoptRefWillBeNoop(new GeofencingEvent); |
| 26 } | 26 } |
| 27 | 27 |
| 28 static PassRefPtrWillBeRawPtr<GeofencingEvent> create(const AtomicString& ty
pe, const String& id, GeofencingRegion* region) | 28 static RawPtr<GeofencingEvent> create(const AtomicString& type, const String
& id, GeofencingRegion* region) |
| 29 { | 29 { |
| 30 return adoptRefWillBeNoop(new GeofencingEvent(type, id, region)); | 30 return new GeofencingEvent(type, id, region); |
| 31 } | 31 } |
| 32 | 32 |
| 33 ~GeofencingEvent() override; | 33 ~GeofencingEvent() override; |
| 34 DECLARE_VIRTUAL_TRACE(); | 34 DECLARE_VIRTUAL_TRACE(); |
| 35 | 35 |
| 36 const AtomicString& interfaceName() const override; | 36 const AtomicString& interfaceName() const override; |
| 37 | 37 |
| 38 String id() const { return m_id; } | 38 String id() const { return m_id; } |
| 39 | 39 |
| 40 GeofencingRegion* region() const { return m_region; } | 40 GeofencingRegion* region() const { return m_region; } |
| 41 | 41 |
| 42 private: | 42 private: |
| 43 GeofencingEvent(); | 43 GeofencingEvent(); |
| 44 GeofencingEvent(const AtomicString& type, const String& id, GeofencingRegion
*); | 44 GeofencingEvent(const AtomicString& type, const String& id, GeofencingRegion
*); |
| 45 String m_id; | 45 String m_id; |
| 46 PersistentWillBeMember<GeofencingRegion> m_region; | 46 Member<GeofencingRegion> m_region; |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 } // namespace blink | 49 } // namespace blink |
| 50 | 50 |
| 51 #endif // GeofencingEvent_h | 51 #endif // GeofencingEvent_h |
| OLD | NEW |