OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // This file has been auto-generated by code_generator_v8.py. | 5 // This file has been auto-generated by code_generator_v8.py. |
6 // DO NOT MODIFY! | 6 // DO NOT MODIFY! |
7 | 7 |
8 // This file has been generated from the Jinja2 template in | 8 // This file has been generated from the Jinja2 template in |
9 // third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl | 9 // third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl |
10 | 10 |
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
893 {"keys", TestInterface5ImplementationV8Internal::keysMethodCallback, 0, 0, v
8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, | 893 {"keys", TestInterface5ImplementationV8Internal::keysMethodCallback, 0, 0, v
8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
894 {"values", TestInterface5ImplementationV8Internal::valuesMethodCallback, 0,
0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, | 894 {"values", TestInterface5ImplementationV8Internal::valuesMethodCallback, 0,
0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
895 {"entries", TestInterface5ImplementationV8Internal::entriesMethodCallback, 0
, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}
, | 895 {"entries", TestInterface5ImplementationV8Internal::entriesMethodCallback, 0
, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}
, |
896 {"forEach", TestInterface5ImplementationV8Internal::forEachMethodCallback, 0
, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}
, | 896 {"forEach", TestInterface5ImplementationV8Internal::forEachMethodCallback, 0
, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}
, |
897 {"toString", TestInterface5ImplementationV8Internal::toStringMethodCallback,
0, 0, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::OnP
rototype, V8DOMConfiguration::CheckHolder}, | 897 {"toString", TestInterface5ImplementationV8Internal::toStringMethodCallback,
0, 0, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::OnP
rototype, V8DOMConfiguration::CheckHolder}, |
898 }; | 898 }; |
899 | 899 |
900 static void installV8TestInterface5Template(v8::Isolate* isolate, const DOMWrapp
erWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) { | 900 static void installV8TestInterface5Template(v8::Isolate* isolate, const DOMWrapp
erWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) { |
901 // Initialize the interface object's template. | 901 // Initialize the interface object's template. |
902 V8DOMConfiguration::initializeDOMInterfaceTemplate(isolate, interfaceTemplate,
V8TestInterface5::wrapperTypeInfo.interfaceName, V8TestInterfaceEmpty::domTempl
ate(isolate, world), V8TestInterface5::internalFieldCount); | 902 V8DOMConfiguration::initializeDOMInterfaceTemplate(isolate, interfaceTemplate,
V8TestInterface5::wrapperTypeInfo.interfaceName, V8TestInterfaceEmpty::domTempl
ate(isolate, world), V8TestInterface5::internalFieldCount); |
| 903 |
| 904 if (!RuntimeEnabledFeatures::featureNameEnabled()) { |
| 905 return; |
| 906 } |
| 907 |
903 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp
late); | 908 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp
late); |
904 ALLOW_UNUSED_LOCAL(signature); | 909 ALLOW_UNUSED_LOCAL(signature); |
905 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTe
mplate(); | 910 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTe
mplate(); |
906 ALLOW_UNUSED_LOCAL(instanceTemplate); | 911 ALLOW_UNUSED_LOCAL(instanceTemplate); |
907 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototype
Template(); | 912 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototype
Template(); |
908 ALLOW_UNUSED_LOCAL(prototypeTemplate); | 913 ALLOW_UNUSED_LOCAL(prototypeTemplate); |
909 | 914 |
910 // Register DOM constants, attributes and operations. | 915 // Register DOM constants, attributes and operations. |
911 if (RuntimeEnabledFeatures::featureNameEnabled()) { | 916 const V8DOMConfiguration::ConstantConfiguration V8TestInterface5Constants[] =
{ |
912 const V8DOMConfiguration::ConstantConfiguration V8TestInterface5Constants[]
= { | 917 {"UNSIGNED_LONG", 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong}, |
913 {"UNSIGNED_LONG", 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong}, | 918 {"CONST_JAVASCRIPT", 1, 0, V8DOMConfiguration::ConstantTypeShort}, |
914 {"CONST_JAVASCRIPT", 1, 0, V8DOMConfiguration::ConstantTypeShort}, | 919 }; |
915 }; | 920 V8DOMConfiguration::installConstants(isolate, interfaceTemplate, prototypeTemp
late, V8TestInterface5Constants, WTF_ARRAY_LENGTH(V8TestInterface5Constants)); |
916 V8DOMConfiguration::installConstants(isolate, interfaceTemplate, prototypeTe
mplate, V8TestInterface5Constants, WTF_ARRAY_LENGTH(V8TestInterface5Constants)); | 921 V8DOMConfiguration::installLazyDataAttributes(isolate, world, instanceTemplate
, prototypeTemplate, V8TestInterface5LazyDataAttributes, WTF_ARRAY_LENGTH(V8Test
Interface5LazyDataAttributes)); |
917 V8DOMConfiguration::installLazyDataAttributes(isolate, world, instanceTempla
te, prototypeTemplate, V8TestInterface5LazyDataAttributes, WTF_ARRAY_LENGTH(V8Te
stInterface5LazyDataAttributes)); | 922 V8DOMConfiguration::installAccessors(isolate, world, instanceTemplate, prototy
peTemplate, interfaceTemplate, signature, V8TestInterface5Accessors, WTF_ARRAY_L
ENGTH(V8TestInterface5Accessors)); |
918 V8DOMConfiguration::installAccessors(isolate, world, instanceTemplate, proto
typeTemplate, interfaceTemplate, signature, V8TestInterface5Accessors, WTF_ARRAY
_LENGTH(V8TestInterface5Accessors)); | 923 V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, prototype
Template, interfaceTemplate, signature, V8TestInterface5Methods, WTF_ARRAY_LENGT
H(V8TestInterface5Methods)); |
919 V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, prototy
peTemplate, interfaceTemplate, signature, V8TestInterface5Methods, WTF_ARRAY_LEN
GTH(V8TestInterface5Methods)); | |
920 } | |
921 | 924 |
922 // Indexed properties | 925 // Indexed properties |
923 v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(TestInter
face5ImplementationV8Internal::indexedPropertyGetterCallback, TestInterface5Impl
ementationV8Internal::indexedPropertySetterCallback, 0, TestInterface5Implementa
tionV8Internal::indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestIn
terface5Implementation>, v8::Local<v8::Value>(), v8::PropertyHandlerFlags::kNone
); | 926 v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(TestInter
face5ImplementationV8Internal::indexedPropertyGetterCallback, TestInterface5Impl
ementationV8Internal::indexedPropertySetterCallback, 0, TestInterface5Implementa
tionV8Internal::indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestIn
terface5Implementation>, v8::Local<v8::Value>(), v8::PropertyHandlerFlags::kNone
); |
924 instanceTemplate->SetHandler(indexedPropertyHandlerConfig); | 927 instanceTemplate->SetHandler(indexedPropertyHandlerConfig); |
925 // Named properties | 928 // Named properties |
926 v8::NamedPropertyHandlerConfiguration namedPropertyHandlerConfig(TestInterface
5ImplementationV8Internal::namedPropertyGetterCallback, TestInterface5Implementa
tionV8Internal::namedPropertySetterCallback, TestInterface5ImplementationV8Inter
nal::namedPropertyQueryCallback, TestInterface5ImplementationV8Internal::namedPr
opertyDeleterCallback, TestInterface5ImplementationV8Internal::namedPropertyEnum
eratorCallback, v8::Local<v8::Value>(), static_cast<v8::PropertyHandlerFlags>(in
t(v8::PropertyHandlerFlags::kOnlyInterceptStrings) | int(v8::PropertyHandlerFlag
s::kNonMasking))); | 929 v8::NamedPropertyHandlerConfiguration namedPropertyHandlerConfig(TestInterface
5ImplementationV8Internal::namedPropertyGetterCallback, TestInterface5Implementa
tionV8Internal::namedPropertySetterCallback, TestInterface5ImplementationV8Inter
nal::namedPropertyQueryCallback, TestInterface5ImplementationV8Internal::namedPr
opertyDeleterCallback, TestInterface5ImplementationV8Internal::namedPropertyEnum
eratorCallback, v8::Local<v8::Value>(), static_cast<v8::PropertyHandlerFlags>(in
t(v8::PropertyHandlerFlags::kOnlyInterceptStrings) | int(v8::PropertyHandlerFlag
s::kNonMasking))); |
927 instanceTemplate->SetHandler(namedPropertyHandlerConfig); | 930 instanceTemplate->SetHandler(namedPropertyHandlerConfig); |
928 | 931 |
929 // Iterator (@@iterator) | 932 // Iterator (@@iterator) |
930 const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorCo
nfiguration = { v8::Symbol::GetIterator, TestInterface5ImplementationV8Internal:
:iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::OnPrototype }; | 933 const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorCo
nfiguration = { v8::Symbol::GetIterator, TestInterface5ImplementationV8Internal:
:iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::OnPrototype }; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
980 const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodMetho
dConfiguration = {"windowExposedStaticMethod", TestInterface5ImplementationV8Int
ernal::windowExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfigurati
on::OnInterface, V8DOMConfiguration::CheckHolder}; | 983 const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodMetho
dConfiguration = {"windowExposedStaticMethod", TestInterface5ImplementationV8Int
ernal::windowExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfigurati
on::OnInterface, V8DOMConfiguration::CheckHolder}; |
981 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), p
rototypeObject, interfaceObject, signature, windowExposedStaticMethodMethodConfi
guration); | 984 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), p
rototypeObject, interfaceObject, signature, windowExposedStaticMethodMethodConfi
guration); |
982 } | 985 } |
983 if (executionContext && (executionContext->isDocument() || executionContext->i
sServiceWorkerGlobalScope())) { | 986 if (executionContext && (executionContext->isDocument() || executionContext->i
sServiceWorkerGlobalScope())) { |
984 const V8DOMConfiguration::MethodConfiguration windowAndServiceWorkerExposedM
ethodMethodConfiguration = {"windowAndServiceWorkerExposedMethod", TestInterface
5ImplementationV8Internal::windowAndServiceWorkerExposedMethodMethodCallback, 0,
0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; | 987 const V8DOMConfiguration::MethodConfiguration windowAndServiceWorkerExposedM
ethodMethodConfiguration = {"windowAndServiceWorkerExposedMethod", TestInterface
5ImplementationV8Internal::windowAndServiceWorkerExposedMethodMethodCallback, 0,
0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; |
985 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), p
rototypeObject, interfaceObject, signature, windowAndServiceWorkerExposedMethodM
ethodConfiguration); | 988 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), p
rototypeObject, interfaceObject, signature, windowAndServiceWorkerExposedMethodM
ethodConfiguration); |
986 } | 989 } |
987 } | 990 } |
988 | 991 |
989 } // namespace blink | 992 } // namespace blink |
OLD | NEW |