| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google, Inc. All Rights Reserved. | 2 * Copyright (C) 2011 Google, 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 18 matching lines...) Expand all Loading... |
| 29 #include "platform/heap/Handle.h" | 29 #include "platform/heap/Handle.h" |
| 30 #include "wtf/Allocator.h" | 30 #include "wtf/Allocator.h" |
| 31 #include "wtf/PassRefPtr.h" | 31 #include "wtf/PassRefPtr.h" |
| 32 #include "wtf/text/AtomicString.h" | 32 #include "wtf/text/AtomicString.h" |
| 33 | 33 |
| 34 namespace blink { | 34 namespace blink { |
| 35 | 35 |
| 36 class Event; | 36 class Event; |
| 37 | 37 |
| 38 class EventFactoryBase { | 38 class EventFactoryBase { |
| 39 USING_FAST_MALLOC(EventFactory); | 39 USING_FAST_MALLOC(EventFactoryBase); |
| 40 public: | 40 public: |
| 41 virtual PassRefPtrWillBeRawPtr<Event> create(const String& eventType) = 0; | 41 virtual PassRefPtrWillBeRawPtr<Event> create(const String& eventType) = 0; |
| 42 virtual ~EventFactoryBase() { } | 42 virtual ~EventFactoryBase() { } |
| 43 | 43 |
| 44 protected: | 44 protected: |
| 45 EventFactoryBase() { } | 45 EventFactoryBase() { } |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 class EventFactory final : public EventFactoryBase { | 48 class EventFactory final : public EventFactoryBase { |
| 49 public: | 49 public: |
| 50 static PassOwnPtr<EventFactory> create() | 50 static PassOwnPtr<EventFactory> create() |
| 51 { | 51 { |
| 52 return adoptPtr(new EventFactory()); | 52 return adoptPtr(new EventFactory()); |
| 53 } | 53 } |
| 54 | 54 |
| 55 PassRefPtrWillBeRawPtr<Event> create(const String& eventType) override; | 55 PassRefPtrWillBeRawPtr<Event> create(const String& eventType) override; |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 } | 58 } |
| 59 | 59 |
| 60 #endif | 60 #endif |
| OLD | NEW |