| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 namespace blink { | 31 namespace blink { |
| 32 | 32 |
| 33 CustomEvent::CustomEvent() | 33 CustomEvent::CustomEvent() |
| 34 { | 34 { |
| 35 } | 35 } |
| 36 | 36 |
| 37 CustomEvent::CustomEvent(const AtomicString& type, const CustomEventInit& initia
lizer) | 37 CustomEvent::CustomEvent(const AtomicString& type, const CustomEventInit& initia
lizer) |
| 38 : Event(type, initializer) | 38 : Event(type, initializer) |
| 39 { | 39 { |
| 40 if (initializer.hasDetail()) |
| 41 m_detail = initializer.detail(); |
| 40 } | 42 } |
| 41 | 43 |
| 42 CustomEvent::~CustomEvent() | 44 CustomEvent::~CustomEvent() |
| 43 { | 45 { |
| 44 } | 46 } |
| 45 | 47 |
| 46 void CustomEvent::initCustomEvent(const AtomicString& type, bool canBubble, bool
cancelable, PassRefPtr<SerializedScriptValue> serializedDetail) | 48 void CustomEvent::initCustomEvent(const AtomicString& type, bool canBubble, bool
cancelable, PassRefPtr<SerializedScriptValue> serializedDetail) |
| 47 { | 49 { |
| 48 if (dispatched()) | 50 if (dispatched()) |
| 49 return; | 51 return; |
| 50 | 52 |
| 51 initEvent(type, canBubble, cancelable); | 53 initEvent(type, canBubble, cancelable); |
| 52 | 54 |
| 53 m_serializedDetail = serializedDetail; | 55 m_serializedDetail = serializedDetail; |
| 54 } | 56 } |
| 55 | 57 |
| 56 const AtomicString& CustomEvent::interfaceName() const | 58 const AtomicString& CustomEvent::interfaceName() const |
| 57 { | 59 { |
| 58 return EventNames::CustomEvent; | 60 return EventNames::CustomEvent; |
| 59 } | 61 } |
| 60 | 62 |
| 61 DEFINE_TRACE(CustomEvent) | 63 DEFINE_TRACE(CustomEvent) |
| 62 { | 64 { |
| 63 Event::trace(visitor); | 65 Event::trace(visitor); |
| 64 } | 66 } |
| 65 | 67 |
| 66 } // namespace blink | 68 } // namespace blink |
| OLD | NEW |