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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 return false; | 53 return false; |
54 | 54 |
55 if (event->target() == m_owner) | 55 if (event->target() == m_owner) |
56 event->setTarget(nullptr); | 56 event->setTarget(nullptr); |
57 | 57 |
58 TRACE_EVENT_ASYNC_BEGIN1("event", "GenericEventQueue:enqueueEvent", event, | 58 TRACE_EVENT_ASYNC_BEGIN1("event", "GenericEventQueue:enqueueEvent", event, |
59 "type", event->type().ascii()); | 59 "type", event->type().ascii()); |
60 EventTarget* target = event->target() ? event->target() : m_owner.get(); | 60 EventTarget* target = event->target() ? event->target() : m_owner.get(); |
61 InspectorInstrumentation::asyncTaskScheduled(target->getExecutionContext(), | 61 InspectorInstrumentation::asyncTaskScheduled(target->getExecutionContext(), |
62 event->type(), event); | 62 event->type(), event); |
63 m_pendingEvents.append(event); | 63 m_pendingEvents.push_back(event); |
64 | 64 |
65 if (!m_timer.isActive()) | 65 if (!m_timer.isActive()) |
66 m_timer.startOneShot(0, BLINK_FROM_HERE); | 66 m_timer.startOneShot(0, BLINK_FROM_HERE); |
67 | 67 |
68 return true; | 68 return true; |
69 } | 69 } |
70 | 70 |
71 bool GenericEventQueue::cancelEvent(Event* event) { | 71 bool GenericEventQueue::cancelEvent(Event* event) { |
72 bool found = m_pendingEvents.contains(event); | 72 bool found = m_pendingEvents.contains(event); |
73 | 73 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 event); | 126 event); |
127 } | 127 } |
128 m_pendingEvents.clear(); | 128 m_pendingEvents.clear(); |
129 } | 129 } |
130 | 130 |
131 bool GenericEventQueue::hasPendingEvents() const { | 131 bool GenericEventQueue::hasPendingEvents() const { |
132 return m_pendingEvents.size(); | 132 return m_pendingEvents.size(); |
133 } | 133 } |
134 | 134 |
135 } // namespace blink | 135 } // namespace blink |
OLD | NEW |