| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2009 Apple Inc. All Rights Reserved. |
| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 static PassRefPtr<BeforeLoadEvent> create(const AtomicString& type, const Be
foreLoadEventInit& initializer) | 56 static PassRefPtr<BeforeLoadEvent> create(const AtomicString& type, const Be
foreLoadEventInit& initializer) |
| 57 { | 57 { |
| 58 return adoptRef(new BeforeLoadEvent(type, initializer)); | 58 return adoptRef(new BeforeLoadEvent(type, initializer)); |
| 59 } | 59 } |
| 60 | 60 |
| 61 const String& url() const { return m_url; } | 61 const String& url() const { return m_url; } |
| 62 | 62 |
| 63 virtual const AtomicString& interfaceName() const OVERRIDE { return EventNam
es::BeforeLoadEvent; } | 63 virtual const AtomicString& interfaceName() const OVERRIDE { return EventNam
es::BeforeLoadEvent; } |
| 64 | 64 |
| 65 virtual void trace(Visitor* visitor) OVERRIDE { Event::trace(visitor); } |
| 66 |
| 65 private: | 67 private: |
| 66 BeforeLoadEvent() | 68 BeforeLoadEvent() |
| 67 { | 69 { |
| 68 RELEASE_ASSERT(RuntimeEnabledFeatures::beforeLoadEnabled()); | 70 RELEASE_ASSERT(RuntimeEnabledFeatures::beforeLoadEnabled()); |
| 69 ScriptWrappable::init(this); | 71 ScriptWrappable::init(this); |
| 70 } | 72 } |
| 71 | 73 |
| 72 explicit BeforeLoadEvent(const String& url) | 74 explicit BeforeLoadEvent(const String& url) |
| 73 : Event(EventTypeNames::beforeload, false, true) | 75 : Event(EventTypeNames::beforeload, false, true) |
| 74 , m_url(url) | 76 , m_url(url) |
| 75 { | 77 { |
| 76 RELEASE_ASSERT(RuntimeEnabledFeatures::beforeLoadEnabled()); | 78 RELEASE_ASSERT(RuntimeEnabledFeatures::beforeLoadEnabled()); |
| 77 ScriptWrappable::init(this); | 79 ScriptWrappable::init(this); |
| 78 } | 80 } |
| 79 | 81 |
| 80 BeforeLoadEvent(const AtomicString& type, const BeforeLoadEventInit& initial
izer) | 82 BeforeLoadEvent(const AtomicString& type, const BeforeLoadEventInit& initial
izer) |
| 81 : Event(type, initializer) | 83 : Event(type, initializer) |
| 82 , m_url(initializer.url) | 84 , m_url(initializer.url) |
| 83 { | 85 { |
| 84 RELEASE_ASSERT(RuntimeEnabledFeatures::beforeLoadEnabled()); | 86 RELEASE_ASSERT(RuntimeEnabledFeatures::beforeLoadEnabled()); |
| 85 ScriptWrappable::init(this); | 87 ScriptWrappable::init(this); |
| 86 } | 88 } |
| 87 | 89 |
| 88 String m_url; | 90 String m_url; |
| 89 }; | 91 }; |
| 90 | 92 |
| 91 } // namespace WebCore | 93 } // namespace WebCore |
| 92 | 94 |
| 93 #endif // BeforeLoadEvent_h | 95 #endif // BeforeLoadEvent_h |
| OLD | NEW |