| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 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 29 matching lines...) Expand all Loading... |
| 40 static EventSender* create(const AtomicString& eventType) | 40 static EventSender* create(const AtomicString& eventType) |
| 41 { | 41 { |
| 42 return new EventSender(eventType); | 42 return new EventSender(eventType); |
| 43 } | 43 } |
| 44 | 44 |
| 45 const AtomicString& eventType() const { return m_eventType; } | 45 const AtomicString& eventType() const { return m_eventType; } |
| 46 void dispatchEventSoon(T*); | 46 void dispatchEventSoon(T*); |
| 47 void cancelEvent(T*); | 47 void cancelEvent(T*); |
| 48 void dispatchPendingEvents(); | 48 void dispatchPendingEvents(); |
| 49 | 49 |
| 50 #if ENABLE(ASSERT) | 50 #if DCHECK_IS_ON() |
| 51 bool hasPendingEvents(T* sender) const | 51 bool hasPendingEvents(T* sender) const |
| 52 { | 52 { |
| 53 return m_dispatchSoonList.find(sender) != kNotFound || m_dispatchingList
.find(sender) != kNotFound; | 53 return m_dispatchSoonList.find(sender) != kNotFound || m_dispatchingList
.find(sender) != kNotFound; |
| 54 } | 54 } |
| 55 #endif | 55 #endif |
| 56 | 56 |
| 57 DEFINE_INLINE_TRACE() | 57 DEFINE_INLINE_TRACE() |
| 58 { | 58 { |
| 59 visitor->trace(m_dispatchSoonList); | 59 visitor->trace(m_dispatchSoonList); |
| 60 visitor->trace(m_dispatchingList); | 60 visitor->trace(m_dispatchingList); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 m_dispatchingList[i] = nullptr; | 117 m_dispatchingList[i] = nullptr; |
| 118 sender->dispatchPendingEvent(this); | 118 sender->dispatchPendingEvent(this); |
| 119 } | 119 } |
| 120 } | 120 } |
| 121 m_dispatchingList.clear(); | 121 m_dispatchingList.clear(); |
| 122 } | 122 } |
| 123 | 123 |
| 124 } // namespace blink | 124 } // namespace blink |
| 125 | 125 |
| 126 #endif // EventSender_h | 126 #endif // EventSender_h |
| OLD | NEW |