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

Side by Side Diff: third_party/WebKit/Source/core/events/GenericEventQueue.cpp

Issue 2585283002: Migrate WTF::Vector::append() to ::push_back() [part 6 of N] (Closed)
Patch Set: Created 3 years, 12 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 unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/EventTarget.cpp ('k') | third_party/WebKit/Source/core/events/InputEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698