Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: Source/core/events/HashChangeEvent.h

Issue 133133006: Update Event classes to use OVERRIDE / FINAL when needed (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/events/GestureEvent.h ('k') | Source/core/events/KeyboardEvent.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 17 matching lines...) Expand all
28 28
29 struct HashChangeEventInit : public EventInit { 29 struct HashChangeEventInit : public EventInit {
30 HashChangeEventInit() 30 HashChangeEventInit()
31 { 31 {
32 }; 32 };
33 33
34 String oldURL; 34 String oldURL;
35 String newURL; 35 String newURL;
36 }; 36 };
37 37
38 class HashChangeEvent : public Event { 38 class HashChangeEvent FINAL : public Event {
39 public: 39 public:
40 static PassRefPtr<HashChangeEvent> create() 40 static PassRefPtr<HashChangeEvent> create()
41 { 41 {
42 return adoptRef(new HashChangeEvent); 42 return adoptRef(new HashChangeEvent);
43 } 43 }
44 44
45 static PassRefPtr<HashChangeEvent> create(const String& oldURL, const String & newURL) 45 static PassRefPtr<HashChangeEvent> create(const String& oldURL, const String & newURL)
46 { 46 {
47 return adoptRef(new HashChangeEvent(oldURL, newURL)); 47 return adoptRef(new HashChangeEvent(oldURL, newURL));
48 } 48 }
(...skipping 10 matching lines...) Expand all
59 59
60 initEvent(eventType, canBubble, cancelable); 60 initEvent(eventType, canBubble, cancelable);
61 61
62 m_oldURL = oldURL; 62 m_oldURL = oldURL;
63 m_newURL = newURL; 63 m_newURL = newURL;
64 } 64 }
65 65
66 const String& oldURL() const { return m_oldURL; } 66 const String& oldURL() const { return m_oldURL; }
67 const String& newURL() const { return m_newURL; } 67 const String& newURL() const { return m_newURL; }
68 68
69 virtual const AtomicString& interfaceName() const { return EventNames::HashC hangeEvent; } 69 virtual const AtomicString& interfaceName() const OVERRIDE { return EventNam es::HashChangeEvent; }
70 70
71 private: 71 private:
72 HashChangeEvent() 72 HashChangeEvent()
73 { 73 {
74 ScriptWrappable::init(this); 74 ScriptWrappable::init(this);
75 } 75 }
76 76
77 HashChangeEvent(const String& oldURL, const String& newURL) 77 HashChangeEvent(const String& oldURL, const String& newURL)
78 : Event(EventTypeNames::hashchange, false, false) 78 : Event(EventTypeNames::hashchange, false, false)
79 , m_oldURL(oldURL) 79 , m_oldURL(oldURL)
(...skipping 10 matching lines...) Expand all
90 ScriptWrappable::init(this); 90 ScriptWrappable::init(this);
91 } 91 }
92 92
93 String m_oldURL; 93 String m_oldURL;
94 String m_newURL; 94 String m_newURL;
95 }; 95 };
96 96
97 } // namespace WebCore 97 } // namespace WebCore
98 98
99 #endif // HashChangeEvent_h 99 #endif // HashChangeEvent_h
OLDNEW
« no previous file with comments | « Source/core/events/GestureEvent.h ('k') | Source/core/events/KeyboardEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698