Chromium Code Reviews| 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 RelatedEvent_h | |
| 6 #define RelatedEvent_h | |
| 7 | |
| 8 #include "core/events/Event.h" | |
| 9 | |
| 10 namespace blink { | |
| 11 | |
| 12 struct RelatedEventInit : public EventInit { | |
| 13 RelatedEventInit(); | |
| 14 RefPtrWillBeMember<EventTarget> relatedTarget; | |
| 15 }; | |
| 16 | |
| 17 class RelatedEvent FINAL : public Event { | |
| 18 public: | |
| 19 static PassRefPtrWillBeRawPtr<RelatedEvent> create(); | |
|
tkent
2014/08/06 12:56:02
Is this necessary?
pals
2014/08/06 13:05:13
This is reffered by this https://code.google.com/p
| |
| 20 static PassRefPtrWillBeRawPtr<RelatedEvent> create(const AtomicString& type, bool canBubble, bool cancelable, EventTarget* relatedTarget); | |
| 21 static PassRefPtrWillBeRawPtr<RelatedEvent> create(const AtomicString& event Type, const RelatedEventInit&); | |
| 22 | |
| 23 virtual ~RelatedEvent(); | |
| 24 | |
| 25 EventTarget* relatedTarget() const { return m_relatedTarget.get(); } | |
| 26 void setRelatedTarget(PassRefPtrWillBeRawPtr<EventTarget> relatedTarget) { m _relatedTarget = relatedTarget; } | |
|
tkent
2014/08/06 12:56:02
EventTarget* is enough for the argument. We don't
pals
2014/08/06 13:05:13
Done.
tkent
2014/08/06 23:19:34
I think this function won't be used. Let's remove
| |
| 27 | |
| 28 | |
| 29 virtual const AtomicString& interfaceName() const OVERRIDE { return EventNam es::RelatedEvent; } | |
| 30 virtual bool isRelatedEvent() const OVERRIDE { return true; } | |
| 31 | |
| 32 virtual void trace(Visitor*) OVERRIDE; | |
| 33 | |
| 34 private: | |
| 35 RelatedEvent(); | |
| 36 RelatedEvent(const AtomicString& type, bool canBubble, bool cancelable, Even tTarget*); | |
| 37 RelatedEvent(const AtomicString& type, const RelatedEventInit&); | |
| 38 | |
| 39 RefPtrWillBeMember<EventTarget> m_relatedTarget; | |
| 40 }; | |
| 41 | |
| 42 DEFINE_EVENT_TYPE_CASTS(RelatedEvent); | |
| 43 | |
| 44 } // namespace blink | |
| 45 | |
| 46 #endif // RelatedEvent_h | |
| OLD | NEW |