Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) | |
| 3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) | |
| 4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | |
| 5 * Copyright (C) 2003, 2005, 2006, 2008 Apple Inc. All rights reserved. | |
| 6 * | |
| 7 * This library is free software; you can redistribute it and/or | |
| 8 * modify it under the terms of the GNU Library General Public | |
| 9 * License as published by the Free Software Foundation; either | |
| 10 * version 2 of the License, or (at your option) any later version. | |
| 11 * | |
| 12 * This library is distributed in the hope that it will be useful, | |
| 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 15 * Library General Public License for more details. | |
| 16 * | |
| 17 * You should have received a copy of the GNU Library General Public License | |
| 18 * along with this library; see the file COPYING.LIB. If not, write to | |
| 19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |
| 20 * Boston, MA 02110-1301, USA. | |
| 21 */ | |
|
esprehn
2014/05/20 05:51:34
Use the shorter 3 line one.
pals
2014/05/21 07:55:12
Done.
| |
| 22 | |
| 23 #include "config.h" | |
| 24 #include "core/events/RelatedEvent.h" | |
| 25 | |
| 26 namespace WebCore { | |
| 27 | |
| 28 RelatedEventInit::RelatedEventInit() | |
| 29 : relatedTarget(nullptr) | |
| 30 { | |
| 31 } | |
| 32 | |
| 33 PassRefPtr<RelatedEvent> RelatedEvent::create(const AtomicString& type) | |
| 34 { | |
| 35 return adoptRef(new RelatedEvent(type)); | |
| 36 } | |
| 37 | |
| 38 PassRefPtr<RelatedEvent> RelatedEvent::create(const AtomicString& type, const Re latedEventInit& initializer) | |
| 39 { | |
| 40 return adoptRef(new RelatedEvent(type, initializer)); | |
|
esprehn
2014/05/20 05:51:34
Can you just use a default initializer argument an
pals
2014/05/21 07:55:12
I followed the CustomEvent implementation
https://
| |
| 41 } | |
| 42 | |
| 43 RelatedEvent::RelatedEvent() | |
| 44 { | |
| 45 ScriptWrappable::init(this); | |
| 46 } | |
| 47 | |
| 48 RelatedEvent::RelatedEvent(const AtomicString& eventType) | |
| 49 : Event(eventType, true, true) | |
| 50 { | |
| 51 ScriptWrappable::init(this); | |
| 52 } | |
| 53 | |
| 54 RelatedEvent::RelatedEvent(const AtomicString& eventType, const RelatedEventInit & initializer) | |
| 55 : Event(eventType, initializer) | |
| 56 { | |
| 57 ScriptWrappable::init(this); | |
| 58 } | |
| 59 | |
| 60 RelatedEvent::~RelatedEvent() | |
| 61 { | |
| 62 } | |
| 63 | |
| 64 const AtomicString& RelatedEvent::interfaceName() const | |
| 65 { | |
| 66 return EventNames::RelatedEvent; | |
| 67 } | |
| 68 | |
| 69 bool RelatedEvent::isRelatedEvent() const | |
| 70 { | |
| 71 return true; | |
|
esprehn
2014/05/20 05:51:34
I'd put these in the .h file.
pals
2014/05/21 07:55:12
Done.
| |
| 72 } | |
| 73 | |
| 74 } // namespace WebCore | |
| OLD | NEW |