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

Side by Side Diff: Source/core/events/BeforeLoadEvent.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
OLDNEW
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 22 matching lines...) Expand all
33 namespace WebCore { 33 namespace WebCore {
34 34
35 struct BeforeLoadEventInit : public EventInit { 35 struct BeforeLoadEventInit : public EventInit {
36 BeforeLoadEventInit() 36 BeforeLoadEventInit()
37 { 37 {
38 }; 38 };
39 39
40 String url; 40 String url;
41 }; 41 };
42 42
43 class BeforeLoadEvent : public Event { 43 class BeforeLoadEvent FINAL : public Event {
44 public: 44 public:
45 static PassRefPtr<BeforeLoadEvent> create() 45 static PassRefPtr<BeforeLoadEvent> create()
46 { 46 {
47 return adoptRef(new BeforeLoadEvent); 47 return adoptRef(new BeforeLoadEvent);
48 } 48 }
49 49
50 static PassRefPtr<BeforeLoadEvent> create(const String& url) 50 static PassRefPtr<BeforeLoadEvent> create(const String& url)
51 { 51 {
52 return adoptRef(new BeforeLoadEvent(url)); 52 return adoptRef(new BeforeLoadEvent(url));
53 } 53 }
54 54
55 static PassRefPtr<BeforeLoadEvent> create(const AtomicString& type, const Be foreLoadEventInit& initializer) 55 static PassRefPtr<BeforeLoadEvent> create(const AtomicString& type, const Be foreLoadEventInit& initializer)
56 { 56 {
57 return adoptRef(new BeforeLoadEvent(type, initializer)); 57 return adoptRef(new BeforeLoadEvent(type, initializer));
58 } 58 }
59 59
60 const String& url() const { return m_url; } 60 const String& url() const { return m_url; }
61 61
62 virtual const AtomicString& interfaceName() const { return EventNames::Befor eLoadEvent; } 62 virtual const AtomicString& interfaceName() const OVERRIDE { return EventNam es::BeforeLoadEvent; }
63 63
64 private: 64 private:
65 BeforeLoadEvent() 65 BeforeLoadEvent()
66 { 66 {
67 ScriptWrappable::init(this); 67 ScriptWrappable::init(this);
68 } 68 }
69 69
70 explicit BeforeLoadEvent(const String& url) 70 explicit BeforeLoadEvent(const String& url)
71 : Event(EventTypeNames::beforeload, false, true) 71 : Event(EventTypeNames::beforeload, false, true)
72 , m_url(url) 72 , m_url(url)
73 { 73 {
74 ScriptWrappable::init(this); 74 ScriptWrappable::init(this);
75 } 75 }
76 76
77 BeforeLoadEvent(const AtomicString& type, const BeforeLoadEventInit& initial izer) 77 BeforeLoadEvent(const AtomicString& type, const BeforeLoadEventInit& initial izer)
78 : Event(type, initializer) 78 : Event(type, initializer)
79 , m_url(initializer.url) 79 , m_url(initializer.url)
80 { 80 {
81 ScriptWrappable::init(this); 81 ScriptWrappable::init(this);
82 } 82 }
83 83
84 String m_url; 84 String m_url;
85 }; 85 };
86 86
87 } // namespace WebCore 87 } // namespace WebCore
88 88
89 #endif // BeforeLoadEvent_h 89 #endif // BeforeLoadEvent_h
OLDNEW
« no previous file with comments | « Source/core/events/AutocompleteErrorEvent.h ('k') | Source/core/events/BeforeTextInsertedEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698