2 * Copyright (C) 2005, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2006 Jon Shier (jshier@iastate.edu)
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
25 #include "ThreadGlobalData.h"
26 #include <wtf/text/AtomicString.h>
30 #define DOM_EVENT_NAMES_FOR_EACH(macro) \
37 macro(beforeprocess) \
46 macro(compositionend) \
47 macro(compositionstart) \
48 macro(compositionupdate) \
55 macro(deviceorientation) \
89 macro(overflowchanged) \
94 macro(readystatechange) \
114 macro(DOMAttrModified) \
115 macro(DOMCharacterDataModified) \
116 macro(DOMNodeInserted) \
117 macro(DOMNodeInsertedIntoDocument) \
118 macro(DOMNodeRemoved) \
119 macro(DOMNodeRemovedFromDocument) \
120 macro(DOMSubtreeModified) \
121 macro(DOMContentLoaded) \
123 macro(webkitBeforeTextInserted) \
124 macro(webkitEditableContentChanged) \
127 macro(canplaythrough) \
128 macro(durationchange) \
132 macro(loadedmetadata) \
140 macro(volumechange) \
143 macro(webkitbeginfullscreen) \
144 macro(webkitendfullscreen) \
150 macro(webkitAnimationEnd) \
151 macro(webkitAnimationStart) \
152 macro(webkitAnimationIteration) \
154 macro(webkitTransitionEnd) \
156 macro(orientationchange) \
164 /* #if PLATFORM(ANDROID) */ \
165 macro(touchlongpress) \
166 macro(touchdoubletap) \
173 macro(webkitfullscreenchange) \
175 macro(webkitspeechchange) \
177 macro(webglcontextlost) \
178 macro(webglcontextrestored) \
179 macro(webglcontextcreationerror) \
181 macro(audioprocess) \
183 // end of DOM_EVENT_NAMES_FOR_EACH
185 class EventNames : public Noncopyable {
186 int dummy; // Needed to make initialization macro work.
187 // Private to prevent accidental call to EventNames() instead of eventNames()
189 friend class ThreadGlobalData;
192 #define DOM_EVENT_NAMES_DECLARE(name) AtomicString name##Event;
193 DOM_EVENT_NAMES_FOR_EACH(DOM_EVENT_NAMES_DECLARE)
194 #undef DOM_EVENT_NAMES_DECLARE
197 inline EventNames& eventNames()
199 return threadGlobalData().eventNames();