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

Unified Diff: Source/core/events/EventFactory.h

Issue 324813002: Convert raw pointer to PassOwnPtr for EventFactoryBase (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix debug build. Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/modules/EventModulesFactory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/events/EventFactory.h
diff --git a/Source/core/events/EventFactory.h b/Source/core/events/EventFactory.h
index 78f7be1869a60a7998f61bf87d599d185b67f46d..df9cde337a7977c13b0de89ac6550bb53cb58b99 100644
--- a/Source/core/events/EventFactory.h
+++ b/Source/core/events/EventFactory.h
@@ -37,10 +37,19 @@ class Event;
class EventFactoryBase {
public:
virtual PassRefPtrWillBeRawPtr<Event> create(const String& eventType) = 0;
+ virtual ~EventFactoryBase() { }
+
+protected:
+ EventFactoryBase() { }
};
-class EventFactory : public EventFactoryBase {
+class EventFactory FINAL : public EventFactoryBase {
public:
+ static PassOwnPtr<EventFactory> create()
+ {
+ return adoptPtr(new EventFactory());
+ }
+
virtual PassRefPtrWillBeRawPtr<Event> create(const String& eventType) OVERRIDE;
};
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/modules/EventModulesFactory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698