| 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 25 matching lines...) Expand all Loading... |
| 36 struct BeforeLoadEventInit : public EventInit { | 36 struct BeforeLoadEventInit : public EventInit { |
| 37 BeforeLoadEventInit() | 37 BeforeLoadEventInit() |
| 38 { | 38 { |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 String url; | 41 String url; |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 class BeforeLoadEvent FINAL : public Event { | 44 class BeforeLoadEvent FINAL : public Event { |
| 45 public: | 45 public: |
| 46 static PassRefPtr<BeforeLoadEvent> create() | 46 static PassRefPtrWillBeRawPtr<BeforeLoadEvent> create() |
| 47 { | 47 { |
| 48 return adoptRef(new BeforeLoadEvent); | 48 return adoptRefCountedWillBeRefCountedGarbageCollected(new BeforeLoadEve
nt); |
| 49 } | 49 } |
| 50 | 50 |
| 51 static PassRefPtr<BeforeLoadEvent> create(const String& url) | 51 static PassRefPtrWillBeRawPtr<BeforeLoadEvent> create(const String& url) |
| 52 { | 52 { |
| 53 return adoptRef(new BeforeLoadEvent(url)); | 53 return adoptRefCountedWillBeRefCountedGarbageCollected(new BeforeLoadEve
nt(url)); |
| 54 } | 54 } |
| 55 | 55 |
| 56 static PassRefPtr<BeforeLoadEvent> create(const AtomicString& type, const Be
foreLoadEventInit& initializer) | 56 static PassRefPtrWillBeRawPtr<BeforeLoadEvent> create(const AtomicString& ty
pe, const BeforeLoadEventInit& initializer) |
| 57 { | 57 { |
| 58 return adoptRef(new BeforeLoadEvent(type, initializer)); | 58 return adoptRefCountedWillBeRefCountedGarbageCollected(new BeforeLoadEve
nt(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); } | 65 virtual void trace(Visitor* visitor) OVERRIDE { Event::trace(visitor); } |
| 66 | 66 |
| 67 private: | 67 private: |
| 68 BeforeLoadEvent() | 68 BeforeLoadEvent() |
| (...skipping 17 matching lines...) Expand all Loading... |
| 86 RELEASE_ASSERT(RuntimeEnabledFeatures::beforeLoadEnabled()); | 86 RELEASE_ASSERT(RuntimeEnabledFeatures::beforeLoadEnabled()); |
| 87 ScriptWrappable::init(this); | 87 ScriptWrappable::init(this); |
| 88 } | 88 } |
| 89 | 89 |
| 90 String m_url; | 90 String m_url; |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 } // namespace WebCore | 93 } // namespace WebCore |
| 94 | 94 |
| 95 #endif // BeforeLoadEvent_h | 95 #endif // BeforeLoadEvent_h |
| OLD | NEW |