Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / events / RelatedEvent.cpp
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 #include "config.h"
6 #include "core/events/RelatedEvent.h"
7
8 namespace blink {
9
10 RelatedEventInit::RelatedEventInit()
11 {
12 }
13
14 RelatedEvent::~RelatedEvent()
15 {
16 }
17
18 PassRefPtrWillBeRawPtr<RelatedEvent> RelatedEvent::create()
19 {
20     return adoptRefWillBeNoop(new RelatedEvent);
21 }
22
23 PassRefPtrWillBeRawPtr<RelatedEvent> RelatedEvent::create(const AtomicString& type, bool canBubble, bool cancelable, EventTarget* relatedTarget)
24 {
25     return adoptRefWillBeNoop(new RelatedEvent(type, canBubble, cancelable, relatedTarget));
26 }
27
28 PassRefPtrWillBeRawPtr<RelatedEvent> RelatedEvent::create(const AtomicString& type, const RelatedEventInit& initializer)
29 {
30     return adoptRefWillBeNoop(new RelatedEvent(type, initializer));
31 }
32
33 RelatedEvent::RelatedEvent()
34 {
35 }
36
37 RelatedEvent::RelatedEvent(const AtomicString& type, bool canBubble, bool cancelable, EventTarget* relatedTarget)
38     : Event(type, canBubble, cancelable)
39     , m_relatedTarget(relatedTarget)
40 {
41 }
42
43 RelatedEvent::RelatedEvent(const AtomicString& eventType, const RelatedEventInit& initializer)
44     : Event(eventType, initializer)
45     , m_relatedTarget(initializer.relatedTarget)
46 {
47 }
48
49 void RelatedEvent::trace(Visitor* visitor)
50 {
51     visitor->trace(m_relatedTarget);
52     Event::trace(visitor);
53 }
54
55 } // namespace blink