| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Victor Carbune (victor@rosedu.org) | 2 * Copyright (C) 2012 Victor Carbune (victor@rosedu.org) |
| 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 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 namespace blink { | 36 namespace blink { |
| 37 | 37 |
| 38 class GenericEventQueue final : public EventQueue { | 38 class GenericEventQueue final : public EventQueue { |
| 39 WTF_MAKE_FAST_ALLOCATED; | 39 WTF_MAKE_FAST_ALLOCATED; |
| 40 public: | 40 public: |
| 41 static PassOwnPtr<GenericEventQueue> create(EventTarget*); | 41 static PassOwnPtr<GenericEventQueue> create(EventTarget*); |
| 42 virtual ~GenericEventQueue(); | 42 virtual ~GenericEventQueue(); |
| 43 | 43 |
| 44 // EventQueue | 44 // EventQueue |
| 45 virtual void trace(Visitor*) override; | |
| 46 virtual bool enqueueEvent(PassRefPtr<Event>) override; | 45 virtual bool enqueueEvent(PassRefPtr<Event>) override; |
| 47 virtual bool cancelEvent(Event*) override; | 46 virtual bool cancelEvent(Event*) override; |
| 48 virtual void close() override; | 47 virtual void close() override; |
| 49 | 48 |
| 50 void cancelAllEvents(); | 49 void cancelAllEvents(); |
| 51 bool hasPendingEvents() const; | 50 bool hasPendingEvents() const; |
| 52 | 51 |
| 53 private: | 52 private: |
| 54 explicit GenericEventQueue(EventTarget*); | 53 explicit GenericEventQueue(EventTarget*); |
| 55 void timerFired(Timer<GenericEventQueue>*); | 54 void timerFired(Timer<GenericEventQueue>*); |
| 56 | 55 |
| 57 RawPtr<EventTarget> m_owner; | 56 RawPtr<EventTarget> m_owner; |
| 58 Vector<RefPtr<Event> > m_pendingEvents; | 57 Vector<RefPtr<Event> > m_pendingEvents; |
| 59 Timer<GenericEventQueue> m_timer; | 58 Timer<GenericEventQueue> m_timer; |
| 60 | 59 |
| 61 bool m_isClosed; | 60 bool m_isClosed; |
| 62 }; | 61 }; |
| 63 | 62 |
| 64 } | 63 } |
| 65 | 64 |
| 66 #endif | 65 #endif |
| OLD | NEW |