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

Side by Side Diff: third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp

Issue 2584443003: [Binding] Indent by 2 spaces in generated code. (Closed)
Patch Set: Created 4 years 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 // 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 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp late); 903 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp late);
904 ALLOW_UNUSED_LOCAL(signature); 904 ALLOW_UNUSED_LOCAL(signature);
905 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTe mplate(); 905 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTe mplate();
906 ALLOW_UNUSED_LOCAL(instanceTemplate); 906 ALLOW_UNUSED_LOCAL(instanceTemplate);
907 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototype Template(); 907 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototype Template();
908 ALLOW_UNUSED_LOCAL(prototypeTemplate); 908 ALLOW_UNUSED_LOCAL(prototypeTemplate);
909 909
910 // Register DOM constants, attributes and operations. 910 // Register DOM constants, attributes and operations.
911 if (RuntimeEnabledFeatures::featureNameEnabled()) { 911 if (RuntimeEnabledFeatures::featureNameEnabled()) {
912 const V8DOMConfiguration::ConstantConfiguration V8TestInterface5Constants[ ] = { 912 const V8DOMConfiguration::ConstantConfiguration V8TestInterface5Constants[] = {
913 {"UNSIGNED_LONG", 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong}, 913 {"UNSIGNED_LONG", 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong},
914 {"CONST_JAVASCRIPT", 1, 0, V8DOMConfiguration::ConstantTypeShort}, 914 {"CONST_JAVASCRIPT", 1, 0, V8DOMConfiguration::ConstantTypeShort},
915 }; 915 };
916 V8DOMConfiguration::installConstants(isolate, interfaceTemplate, prototype Template, V8TestInterface5Constants, WTF_ARRAY_LENGTH(V8TestInterface5Constants) ); 916 V8DOMConfiguration::installConstants(isolate, interfaceTemplate, prototypeTe mplate, V8TestInterface5Constants, WTF_ARRAY_LENGTH(V8TestInterface5Constants));
917 V8DOMConfiguration::installLazyDataAttributes(isolate, world, instanceTemp late, prototypeTemplate, V8TestInterface5LazyDataAttributes, WTF_ARRAY_LENGTH(V8 TestInterface5LazyDataAttributes)); 917 V8DOMConfiguration::installLazyDataAttributes(isolate, world, instanceTempla te, prototypeTemplate, V8TestInterface5LazyDataAttributes, WTF_ARRAY_LENGTH(V8Te stInterface5LazyDataAttributes));
918 V8DOMConfiguration::installAccessors(isolate, world, instanceTemplate, pro totypeTemplate, interfaceTemplate, signature, V8TestInterface5Accessors, WTF_ARR AY_LENGTH(V8TestInterface5Accessors)); 918 V8DOMConfiguration::installAccessors(isolate, world, instanceTemplate, proto typeTemplate, interfaceTemplate, signature, V8TestInterface5Accessors, WTF_ARRAY _LENGTH(V8TestInterface5Accessors));
919 V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, proto typeTemplate, interfaceTemplate, signature, V8TestInterface5Methods, WTF_ARRAY_L ENGTH(V8TestInterface5Methods)); 919 V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, prototy peTemplate, interfaceTemplate, signature, V8TestInterface5Methods, WTF_ARRAY_LEN GTH(V8TestInterface5Methods));
920 } 920 }
921 921
922 // Indexed properties 922 // 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 ); 923 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); 924 instanceTemplate->SetHandler(indexedPropertyHandlerConfig);
925 // Named properties 925 // 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))); 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)));
927 instanceTemplate->SetHandler(namedPropertyHandlerConfig); 927 instanceTemplate->SetHandler(namedPropertyHandlerConfig);
928 928
929 // Iterator (@@iterator) 929 // Iterator (@@iterator)
(...skipping 17 matching lines...) Expand all
947 947
948 TestInterface5Implementation* V8TestInterface5::toImplWithTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value) { 948 TestInterface5Implementation* V8TestInterface5::toImplWithTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value) {
949 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value) ) : nullptr; 949 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value) ) : nullptr;
950 } 950 }
951 951
952 void V8TestInterface5::preparePrototypeAndInterfaceObject(v8::Local<v8::Context> context, const DOMWrapperWorld& world, v8::Local<v8::Object> prototypeObject, v 8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfac eTemplate) { 952 void V8TestInterface5::preparePrototypeAndInterfaceObject(v8::Local<v8::Context> context, const DOMWrapperWorld& world, v8::Local<v8::Object> prototypeObject, v 8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfac eTemplate) {
953 v8::Isolate* isolate = context->GetIsolate(); 953 v8::Isolate* isolate = context->GetIsolate();
954 ExecutionContext* executionContext = toExecutionContext(context); 954 ExecutionContext* executionContext = toExecutionContext(context);
955 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp late); 955 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp late);
956 if (executionContext && (executionContext->isWorkerGlobalScope())) { 956 if (executionContext && (executionContext->isWorkerGlobalScope())) {
957 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {" workerExposedAttribute", TestInterface5ImplementationV8Internal::workerExposedAt tributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::workerEx posedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cas t<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfig uration::CheckHolder}; 957 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"wo rkerExposedAttribute", TestInterface5ImplementationV8Internal::workerExposedAttr ibuteAttributeGetterCallback, TestInterface5ImplementationV8Internal::workerExpo sedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast< v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfigur ation::CheckHolder};
958 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>( ), prototypeObject, interfaceObject, signature, accessorConfiguration); 958 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration);
959 } 959 }
960 if (executionContext && (executionContext->isDocument())) { 960 if (executionContext && (executionContext->isDocument())) {
961 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {" windowExposedAttribute", TestInterface5ImplementationV8Internal::windowExposedAt tributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::windowEx posedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cas t<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfig uration::CheckHolder}; 961 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"wi ndowExposedAttribute", TestInterface5ImplementationV8Internal::windowExposedAttr ibuteAttributeGetterCallback, TestInterface5ImplementationV8Internal::windowExpo sedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast< v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfigur ation::CheckHolder};
962 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>( ), prototypeObject, interfaceObject, signature, accessorConfiguration); 962 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration);
963 } 963 }
964 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp late); 964 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp late);
965 ExecutionContext* executionContext = toExecutionContext(prototypeObject->Creat ionContext()); 965 ExecutionContext* executionContext = toExecutionContext(prototypeObject->Creat ionContext());
966 DCHECK(executionContext); 966 DCHECK(executionContext);
967 if (executionContext && (executionContext->isWorkerGlobalScope())) { 967 if (executionContext && (executionContext->isWorkerGlobalScope())) {
968 const V8DOMConfiguration::MethodConfiguration workerExposedMethodMethodCon figuration = {"workerExposedMethod", TestInterface5ImplementationV8Internal::wor kerExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; 968 const V8DOMConfiguration::MethodConfiguration workerExposedMethodMethodConfi guration = {"workerExposedMethod", TestInterface5ImplementationV8Internal::worke rExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V 8DOMConfiguration::CheckHolder};
969 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, workerExposedMethodMethodConfigura tion); 969 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), p rototypeObject, interfaceObject, signature, workerExposedMethodMethodConfigurati on);
970 } 970 }
971 if (executionContext && (executionContext->isDocument())) { 971 if (executionContext && (executionContext->isDocument())) {
972 const V8DOMConfiguration::MethodConfiguration windowExposedMethodMethodCon figuration = {"windowExposedMethod", TestInterface5ImplementationV8Internal::win dowExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; 972 const V8DOMConfiguration::MethodConfiguration windowExposedMethodMethodConfi guration = {"windowExposedMethod", TestInterface5ImplementationV8Internal::windo wExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V 8DOMConfiguration::CheckHolder};
973 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, windowExposedMethodMethodConfigura tion); 973 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), p rototypeObject, interfaceObject, signature, windowExposedMethodMethodConfigurati on);
974 } 974 }
975 if (executionContext && (executionContext->isWorkerGlobalScope())) { 975 if (executionContext && (executionContext->isWorkerGlobalScope())) {
976 const V8DOMConfiguration::MethodConfiguration workerExposedStaticMethodMet hodConfiguration = {"workerExposedStaticMethod", TestInterface5ImplementationV8I nternal::workerExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfigura tion::OnInterface, V8DOMConfiguration::CheckHolder}; 976 const V8DOMConfiguration::MethodConfiguration workerExposedStaticMethodMetho dConfiguration = {"workerExposedStaticMethod", TestInterface5ImplementationV8Int ernal::workerExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfigurati on::OnInterface, V8DOMConfiguration::CheckHolder};
977 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, workerExposedStaticMethodMethodCon figuration); 977 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), p rototypeObject, interfaceObject, signature, workerExposedStaticMethodMethodConfi guration);
978 } 978 }
979 if (executionContext && (executionContext->isDocument())) { 979 if (executionContext && (executionContext->isDocument())) {
980 const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodMet hodConfiguration = {"windowExposedStaticMethod", TestInterface5ImplementationV8I nternal::windowExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfigura tion::OnInterface, V8DOMConfiguration::CheckHolder}; 980 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>(), prototypeObject, interfaceObject, signature, windowExposedStaticMethodMethodCon figuration); 981 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), p rototypeObject, interfaceObject, signature, windowExposedStaticMethodMethodConfi guration);
982 } 982 }
983 if (executionContext && (executionContext->isDocument() || executionContext->i sServiceWorkerGlobalScope())) { 983 if (executionContext && (executionContext->isDocument() || executionContext->i sServiceWorkerGlobalScope())) {
984 const V8DOMConfiguration::MethodConfiguration windowAndServiceWorkerExpose dMethodMethodConfiguration = {"windowAndServiceWorkerExposedMethod", TestInterfa ce5ImplementationV8Internal::windowAndServiceWorkerExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder }; 984 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>(), prototypeObject, interfaceObject, signature, windowAndServiceWorkerExposedMetho dMethodConfiguration); 985 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), p rototypeObject, interfaceObject, signature, windowAndServiceWorkerExposedMethodM ethodConfiguration);
986 } 986 }
987 } 987 }
988 988
989 } // namespace blink 989 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698