OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2010 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 namespace blink { | 26 namespace blink { |
27 | 27 |
28 struct HashChangeEventInit : public EventInit { | 28 struct HashChangeEventInit : public EventInit { |
29 HashChangeEventInit() { } | 29 HashChangeEventInit() { } |
30 | 30 |
31 String oldURL; | 31 String oldURL; |
32 String newURL; | 32 String newURL; |
33 }; | 33 }; |
34 | 34 |
35 class HashChangeEvent FINAL : public Event { | 35 class HashChangeEvent final : public Event { |
36 DEFINE_WRAPPERTYPEINFO(); | 36 DEFINE_WRAPPERTYPEINFO(); |
37 public: | 37 public: |
38 static PassRefPtrWillBeRawPtr<HashChangeEvent> create() | 38 static PassRefPtrWillBeRawPtr<HashChangeEvent> create() |
39 { | 39 { |
40 return adoptRefWillBeNoop(new HashChangeEvent); | 40 return adoptRefWillBeNoop(new HashChangeEvent); |
41 } | 41 } |
42 | 42 |
43 static PassRefPtrWillBeRawPtr<HashChangeEvent> create(const String& oldURL,
const String& newURL) | 43 static PassRefPtrWillBeRawPtr<HashChangeEvent> create(const String& oldURL,
const String& newURL) |
44 { | 44 { |
45 return adoptRefWillBeNoop(new HashChangeEvent(oldURL, newURL)); | 45 return adoptRefWillBeNoop(new HashChangeEvent(oldURL, newURL)); |
(...skipping 11 matching lines...) Expand all Loading... |
57 | 57 |
58 initEvent(eventType, canBubble, cancelable); | 58 initEvent(eventType, canBubble, cancelable); |
59 | 59 |
60 m_oldURL = oldURL; | 60 m_oldURL = oldURL; |
61 m_newURL = newURL; | 61 m_newURL = newURL; |
62 } | 62 } |
63 | 63 |
64 const String& oldURL() const { return m_oldURL; } | 64 const String& oldURL() const { return m_oldURL; } |
65 const String& newURL() const { return m_newURL; } | 65 const String& newURL() const { return m_newURL; } |
66 | 66 |
67 virtual const AtomicString& interfaceName() const OVERRIDE { return EventNam
es::HashChangeEvent; } | 67 virtual const AtomicString& interfaceName() const override { return EventNam
es::HashChangeEvent; } |
68 | 68 |
69 virtual void trace(Visitor* visitor) OVERRIDE { Event::trace(visitor); } | 69 virtual void trace(Visitor* visitor) override { Event::trace(visitor); } |
70 | 70 |
71 private: | 71 private: |
72 HashChangeEvent() { } | 72 HashChangeEvent() { } |
73 | 73 |
74 HashChangeEvent(const String& oldURL, const String& newURL) | 74 HashChangeEvent(const String& oldURL, const String& newURL) |
75 : Event(EventTypeNames::hashchange, false, false) | 75 : Event(EventTypeNames::hashchange, false, false) |
76 , m_oldURL(oldURL) | 76 , m_oldURL(oldURL) |
77 , m_newURL(newURL) { } | 77 , m_newURL(newURL) { } |
78 | 78 |
79 HashChangeEvent(const AtomicString& type, const HashChangeEventInit& initial
izer) | 79 HashChangeEvent(const AtomicString& type, const HashChangeEventInit& initial
izer) |
80 : Event(type, initializer) | 80 : Event(type, initializer) |
81 , m_oldURL(initializer.oldURL) | 81 , m_oldURL(initializer.oldURL) |
82 , m_newURL(initializer.newURL) { } | 82 , m_newURL(initializer.newURL) { } |
83 | 83 |
84 String m_oldURL; | 84 String m_oldURL; |
85 String m_newURL; | 85 String m_newURL; |
86 }; | 86 }; |
87 | 87 |
88 } // namespace blink | 88 } // namespace blink |
89 | 89 |
90 #endif // HashChangeEvent_h | 90 #endif // HashChangeEvent_h |
OLD | NEW |