OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_INDEX_H__ | 5 #ifndef V8_INDEX_H__ |
6 #define V8_INDEX_H__ | 6 #define V8_INDEX_H__ |
7 | 7 |
8 #include <v8.h> | 8 #include <v8.h> |
9 #include "PlatformString.h" // for WebCore::String | 9 #include "PlatformString.h" // for WebCore::String |
10 | 10 |
11 namespace WebCore { | 11 namespace WebCore { |
12 | 12 |
13 typedef v8::Persistent<v8::FunctionTemplate> (*FunctionTemplateFactory)(); | 13 typedef v8::Persistent<v8::FunctionTemplate> (*FunctionTemplateFactory)(); |
14 | 14 |
15 #if ENABLE(VIDEO) | 15 #if ENABLE(VIDEO) |
16 #define VIDEO_HTMLELEMENT_TYPES(V) \ | 16 #define VIDEO_HTMLELEMENT_TYPES(V) \ |
17 V(HTMLAUDIOELEMENT, HTMLAudioElement) \ | 17 V(HTMLAUDIOELEMENT, HTMLAudioElement) \ |
18 V(HTMLMEDIAELEMENT, HTMLMediaElement) \ | 18 V(HTMLMEDIAELEMENT, HTMLMediaElement) \ |
19 V(HTMLSOURCEELEMENT, HTMLSourceElement) \ | 19 V(HTMLSOURCEELEMENT, HTMLSourceElement) \ |
20 V(HTMLVIDEOELEMENT, HTMLVideoElement) | 20 V(HTMLVIDEOELEMENT, HTMLVideoElement) |
21 #define VIDEO_NONNODE_TYPES(V) \ | 21 #define VIDEO_NONNODE_TYPES(V) \ |
22 V(MEDIAERROR, MediaError) \ | 22 V(MEDIAERROR, MediaError) \ |
23 V(TIMERANGES, TimeRanges) | 23 V(TIMERANGES, TimeRanges) |
24 #else | 24 #else |
25 #define VIDEO_HTMLELEMENT_TYPES(V) | 25 #define VIDEO_HTMLELEMENT_TYPES(V) |
26 #define VIDEO_NONNODE_TYPES(V) | 26 #define VIDEO_NONNODE_TYPES(V) |
27 #endif | 27 #endif |
28 | 28 |
| 29 #if ENABLE(WORKERS) |
| 30 #define WORKER_NONNODE_WRAPPER_TYPES(V) \ |
| 31 V(WORKER, Worker) \ |
| 32 V(WORKERLOCATION, WorkerLocation) |
| 33 #else |
| 34 #define WORKER_NONNODE_WRAPPER_TYPES(V) |
| 35 #endif |
| 36 |
29 #define DOM_NODE_TYPES(V) \ | 37 #define DOM_NODE_TYPES(V) \ |
30 V(ATTR, Attr) \ | 38 V(ATTR, Attr) \ |
31 V(CHARACTERDATA, CharacterData) \ | 39 V(CHARACTERDATA, CharacterData) \ |
32 V(CDATASECTION, CDATASection) \ | 40 V(CDATASECTION, CDATASection) \ |
33 V(COMMENT, Comment) \ | 41 V(COMMENT, Comment) \ |
34 V(DOCUMENT, Document) \ | 42 V(DOCUMENT, Document) \ |
35 V(DOCUMENTFRAGMENT, DocumentFragment) \ | 43 V(DOCUMENTFRAGMENT, DocumentFragment) \ |
36 V(DOCUMENTTYPE, DocumentType) \ | 44 V(DOCUMENTTYPE, DocumentType) \ |
37 V(ELEMENT, Element) \ | 45 V(ELEMENT, Element) \ |
38 V(ENTITY, Entity) \ | 46 V(ENTITY, Entity) \ |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 V(XMLHTTPREQUESTEXCEPTION, XMLHttpRequestException) \ | 320 V(XMLHTTPREQUESTEXCEPTION, XMLHttpRequestException) \ |
313 V(XMLHTTPREQUESTPROGRESSEVENT, XMLHttpRequestProgressEvent) \ | 321 V(XMLHTTPREQUESTPROGRESSEVENT, XMLHttpRequestProgressEvent) \ |
314 V(XMLSERIALIZER, XMLSerializer) \ | 322 V(XMLSERIALIZER, XMLSerializer) \ |
315 V(XPATHEVALUATOR, XPathEvaluator) \ | 323 V(XPATHEVALUATOR, XPathEvaluator) \ |
316 V(XPATHEXCEPTION, XPathException) \ | 324 V(XPATHEXCEPTION, XPathException) \ |
317 V(XPATHEXPRESSION, XPathExpression) \ | 325 V(XPATHEXPRESSION, XPathExpression) \ |
318 V(XPATHNSRESOLVER, XPathNSResolver) \ | 326 V(XPATHNSRESOLVER, XPathNSResolver) \ |
319 V(XPATHRESULT, XPathResult) \ | 327 V(XPATHRESULT, XPathResult) \ |
320 V(XSLTPROCESSOR, XSLTProcessor) \ | 328 V(XSLTPROCESSOR, XSLTProcessor) \ |
321 ACTIVE_DOM_OBJECT_TYPES(V) \ | 329 ACTIVE_DOM_OBJECT_TYPES(V) \ |
322 VIDEO_NONNODE_TYPES(V) | 330 VIDEO_NONNODE_TYPES(V) \ |
323 | 331 WORKER_NONNODE_WRAPPER_TYPES(V) |
324 | 332 |
325 #define DOM_OBJECT_TYPES(V) \ | 333 #define DOM_OBJECT_TYPES(V) \ |
326 DOM_OBJECT_TYPES_1(V) \ | 334 DOM_OBJECT_TYPES_1(V) \ |
327 DOM_OBJECT_TYPES_2(V) | 335 DOM_OBJECT_TYPES_2(V) |
328 | 336 |
329 | 337 |
330 #if ENABLE(SVG) | 338 #if ENABLE(SVG) |
331 // SVG_OBJECT_TYPES are svg non-node, non-pod types. | 339 // SVG_OBJECT_TYPES are svg non-node, non-pod types. |
332 #define SVG_OBJECT_TYPES(V) \ | 340 #define SVG_OBJECT_TYPES(V) \ |
333 V(SVGANGLE, SVGAngle) \ | 341 V(SVGANGLE, SVGAngle) \ |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 | 465 |
458 static FunctionTemplateFactory GetFactory(V8WrapperType type); | 466 static FunctionTemplateFactory GetFactory(V8WrapperType type); |
459 // Returns a field to be used as cache for the template for the given type | 467 // Returns a field to be used as cache for the template for the given type |
460 static v8::Persistent<v8::FunctionTemplate>* GetCache(V8WrapperType type); | 468 static v8::Persistent<v8::FunctionTemplate>* GetCache(V8WrapperType type); |
461 }; | 469 }; |
462 | 470 |
463 } | 471 } |
464 | 472 |
465 #endif // V8_INDEX_H__ | 473 #endif // V8_INDEX_H__ |
466 | 474 |
OLD | NEW |