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

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

Issue 1322533002: bindings: Supports to change the method location. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed review comments. Created 5 years, 3 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 | Annotate | Revision Log
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. DO NOT MODIFY! 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6 6
7 #include "config.h" 7 #include "config.h"
8 #if ENABLE(CONDITION) 8 #if ENABLE(CONDITION)
9 #include "V8TestInterface5.h" 9 #include "V8TestInterface5.h"
10 10
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 {"testInterfaceAttribute", TestInterface5ImplementationV8Internal::testInter faceAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::te stInterfaceAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v 8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMC onfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, 933 {"testInterfaceAttribute", TestInterface5ImplementationV8Internal::testInter faceAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::te stInterfaceAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v 8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMC onfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
934 {"doubleAttribute", TestInterface5ImplementationV8Internal::doubleAttributeA ttributeGetterCallback, TestInterface5ImplementationV8Internal::doubleAttributeA ttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute> (v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnProto type, V8DOMConfiguration::CheckHolder}, 934 {"doubleAttribute", TestInterface5ImplementationV8Internal::doubleAttributeA ttributeGetterCallback, TestInterface5ImplementationV8Internal::doubleAttributeA ttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute> (v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnProto type, V8DOMConfiguration::CheckHolder},
935 {"floatAttribute", TestInterface5ImplementationV8Internal::floatAttributeAtt ributeGetterCallback, TestInterface5ImplementationV8Internal::floatAttributeAttr ibuteSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8 ::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototyp e, V8DOMConfiguration::CheckHolder}, 935 {"floatAttribute", TestInterface5ImplementationV8Internal::floatAttributeAtt ributeGetterCallback, TestInterface5ImplementationV8Internal::floatAttributeAttr ibuteSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8 ::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototyp e, V8DOMConfiguration::CheckHolder},
936 {"unrestrictedDoubleAttribute", TestInterface5ImplementationV8Internal::unre strictedDoubleAttributeAttributeGetterCallback, TestInterface5ImplementationV8In ternal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT , static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAll Scripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, 936 {"unrestrictedDoubleAttribute", TestInterface5ImplementationV8Internal::unre strictedDoubleAttributeAttributeGetterCallback, TestInterface5ImplementationV8In ternal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT , static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAll Scripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
937 {"unrestrictedFloatAttribute", TestInterface5ImplementationV8Internal::unres trictedFloatAttributeAttributeGetterCallback, TestInterface5ImplementationV8Inte rnal::unrestrictedFloatAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, s tatic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScr ipts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, 937 {"unrestrictedFloatAttribute", TestInterface5ImplementationV8Internal::unres trictedFloatAttributeAttributeGetterCallback, TestInterface5ImplementationV8Inte rnal::unrestrictedFloatAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, s tatic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScr ipts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
938 {"staticStringAttribute", TestInterface5ImplementationV8Internal::staticStri ngAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::stat icStringAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8:: PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConf iguration::OnInterface, V8DOMConfiguration::CheckHolder}, 938 {"staticStringAttribute", TestInterface5ImplementationV8Internal::staticStri ngAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::stat icStringAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8:: PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConf iguration::OnInterface, V8DOMConfiguration::CheckHolder},
939 {"alwaysExposedAttribute", TestInterface5ImplementationV8Internal::alwaysExp osedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::al waysExposedAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v 8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMC onfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, 939 {"alwaysExposedAttribute", TestInterface5ImplementationV8Internal::alwaysExp osedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::al waysExposedAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v 8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMC onfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
940 }; 940 };
941 941
942 const V8DOMConfiguration::MethodConfiguration V8TestInterface5Methods[] = { 942 const V8DOMConfiguration::MethodConfiguration V8TestInterface5Methods[] = {
943 {"voidMethodTestInterfaceEmptyArg", TestInterface5ImplementationV8Internal:: voidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed ToAllScripts}, 943 {"voidMethodTestInterfaceEmptyArg", TestInterface5ImplementationV8Internal:: voidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed ToAllScripts, V8DOMConfiguration::OnPrototype},
944 {"voidMethodDoubleArgFloatArg", TestInterface5ImplementationV8Internal::void MethodDoubleArgFloatArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScr ipts}, 944 {"voidMethodDoubleArgFloatArg", TestInterface5ImplementationV8Internal::void MethodDoubleArgFloatArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScr ipts, V8DOMConfiguration::OnPrototype},
945 {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterface5Implem entationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCal lback, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, 945 {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterface5Implem entationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCal lback, 0, 2, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnProt otype},
946 {"voidMethod", TestInterface5ImplementationV8Internal::voidMethodMethodCallb ack, TestInterface5ImplementationV8Internal::voidMethodMethodCallbackForMainWorl d, 0, V8DOMConfiguration::ExposedToAllScripts}, 946 {"voidMethod", TestInterface5ImplementationV8Internal::voidMethodMethodCallb ack, TestInterface5ImplementationV8Internal::voidMethodMethodCallbackForMainWorl d, 0, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype},
947 {"alwaysExposedMethod", TestInterface5ImplementationV8Internal::alwaysExpose dMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 947 {"alwaysExposedMethod", TestInterface5ImplementationV8Internal::alwaysExpose dMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfi guration::OnPrototype},
948 {"voidMethodBooleanOrDOMStringArg", TestInterface5ImplementationV8Internal:: voidMethodBooleanOrDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed ToAllScripts}, 948 {"voidMethodBooleanOrDOMStringArg", TestInterface5ImplementationV8Internal:: voidMethodBooleanOrDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed ToAllScripts, V8DOMConfiguration::OnPrototype},
949 {"voidMethodDoubleOrDOMStringArg", TestInterface5ImplementationV8Internal::v oidMethodDoubleOrDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedTo AllScripts}, 949 {"voidMethodDoubleOrDOMStringArg", TestInterface5ImplementationV8Internal::v oidMethodDoubleOrDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedTo AllScripts, V8DOMConfiguration::OnPrototype},
950 {"keys", TestInterface5ImplementationV8Internal::keysMethodCallback, 0, 0, V 8DOMConfiguration::ExposedToAllScripts}, 950 {"keys", TestInterface5ImplementationV8Internal::keysMethodCallback, 0, 0, V 8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype},
951 {"values", TestInterface5ImplementationV8Internal::valuesMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 951 {"values", TestInterface5ImplementationV8Internal::valuesMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype},
952 {"entries", TestInterface5ImplementationV8Internal::entriesMethodCallback, 0 , 0, V8DOMConfiguration::ExposedToAllScripts}, 952 {"entries", TestInterface5ImplementationV8Internal::entriesMethodCallback, 0 , 0, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype},
953 {"forEach", TestInterface5ImplementationV8Internal::forEachMethodCallback, 0 , 1, V8DOMConfiguration::ExposedToAllScripts}, 953 {"forEach", TestInterface5ImplementationV8Internal::forEachMethodCallback, 0 , 1, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype},
954 }; 954 };
955 955
956 static void installV8TestInterface5Template(v8::Local<v8::FunctionTemplate> func tionTemplate, v8::Isolate* isolate) 956 static void installV8TestInterface5Template(v8::Local<v8::FunctionTemplate> func tionTemplate, v8::Isolate* isolate)
957 { 957 {
958 functionTemplate->ReadOnlyPrototype(); 958 functionTemplate->ReadOnlyPrototype();
959 959
960 v8::Local<v8::Signature> defaultSignature; 960 v8::Local<v8::Signature> defaultSignature;
961 if (!RuntimeEnabledFeatures::featureNameEnabled()) 961 if (!RuntimeEnabledFeatures::featureNameEnabled())
962 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "TestInterface5", V8TestInterfaceEmpty::domTemplate(isolate), V8TestInterface5::internalFieldCount, 0, 0, 0, 0, 0, 0); 962 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "TestInterface5", V8TestInterfaceEmpty::domTemplate(isolate), V8TestInterface5::internalFieldCount, 0, 0, 0, 0, 0, 0);
963 else 963 else
(...skipping 15 matching lines...) Expand all
979 { 979 {
980 v8::IndexedPropertyHandlerConfiguration config(TestInterface5Implementat ionV8Internal::indexedPropertyGetterCallback, TestInterface5ImplementationV8Inte rnal::indexedPropertySetterCallback, 0, TestInterface5ImplementationV8Internal:: indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestInterface5Implemen tation>); 980 v8::IndexedPropertyHandlerConfiguration config(TestInterface5Implementat ionV8Internal::indexedPropertyGetterCallback, TestInterface5ImplementationV8Inte rnal::indexedPropertySetterCallback, 0, TestInterface5ImplementationV8Internal:: indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestInterface5Implemen tation>);
981 functionTemplate->InstanceTemplate()->SetHandler(config); 981 functionTemplate->InstanceTemplate()->SetHandler(config);
982 } 982 }
983 { 983 {
984 int flags = static_cast<int>(v8::PropertyHandlerFlags::kOnlyInterceptStr ings); 984 int flags = static_cast<int>(v8::PropertyHandlerFlags::kOnlyInterceptStr ings);
985 flags |= static_cast<int>(v8::PropertyHandlerFlags::kNonMasking); 985 flags |= static_cast<int>(v8::PropertyHandlerFlags::kNonMasking);
986 v8::NamedPropertyHandlerConfiguration config(TestInterface5Implementatio nV8Internal::namedPropertyGetterCallback, TestInterface5ImplementationV8Internal ::namedPropertySetterCallback, TestInterface5ImplementationV8Internal::namedProp ertyQueryCallback, TestInterface5ImplementationV8Internal::namedPropertyDeleterC allback, TestInterface5ImplementationV8Internal::namedPropertyEnumeratorCallback , v8::Handle<v8::Value>(), static_cast<v8::PropertyHandlerFlags>(flags)); 986 v8::NamedPropertyHandlerConfiguration config(TestInterface5Implementatio nV8Internal::namedPropertyGetterCallback, TestInterface5ImplementationV8Internal ::namedPropertySetterCallback, TestInterface5ImplementationV8Internal::namedProp ertyQueryCallback, TestInterface5ImplementationV8Internal::namedPropertyDeleterC allback, TestInterface5ImplementationV8Internal::namedPropertyEnumeratorCallback , v8::Handle<v8::Value>(), static_cast<v8::PropertyHandlerFlags>(flags));
987 functionTemplate->InstanceTemplate()->SetHandler(config); 987 functionTemplate->InstanceTemplate()->SetHandler(config);
988 } 988 }
989 const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIterator Configuration = { v8::Symbol::GetIterator, TestInterface5ImplementationV8Interna l::iteratorMethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts }; 989 const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIterator Configuration = { v8::Symbol::GetIterator, TestInterface5ImplementationV8Interna l::iteratorMethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts, V8DOMConf iguration::OnPrototype };
990 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignatu re, v8::DontDelete, symbolKeyedIteratorConfiguration); 990 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignatu re, v8::DontDelete, symbolKeyedIteratorConfiguration);
991 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterfa ce5::legacyCallCustom); 991 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterfa ce5::legacyCallCustom);
992 const V8DOMConfiguration::MethodConfiguration alwaysExposedStaticMethodMetho dConfiguration = { 992 const V8DOMConfiguration::MethodConfiguration alwaysExposedStaticMethodMetho dConfiguration = {"alwaysExposedStaticMethod", TestInterface5ImplementationV8Int ernal::alwaysExposedStaticMethodMethodCallback, 0, 0, V8DOMConfiguration::Expose dToAllScripts, V8DOMConfiguration::OnInterface};
993 "alwaysExposedStaticMethod", TestInterface5ImplementationV8Internal::alw aysExposedStaticMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScri pts, 993 V8DOMConfiguration::installMethod(isolate, instanceTemplate, prototypeTempla te, functionTemplate, defaultSignature, v8::None, alwaysExposedStaticMethodMetho dConfiguration);
994 };
995 V8DOMConfiguration::installMethod(isolate, functionTemplate, v8::Local<v8::S ignature>(), v8::None, alwaysExposedStaticMethodMethodConfiguration);
996 if (context && (context->isWorkerGlobalScope())) { 994 if (context && (context->isWorkerGlobalScope())) {
997 const V8DOMConfiguration::MethodConfiguration workerExposedStaticMethodM ethodConfiguration = { 995 const V8DOMConfiguration::MethodConfiguration workerExposedStaticMethodM ethodConfiguration = {"workerExposedStaticMethod", TestInterface5ImplementationV 8Internal::workerExposedStaticMethodMethodCallback, 0, 0, V8DOMConfiguration::Ex posedToAllScripts, V8DOMConfiguration::OnInterface};
998 "workerExposedStaticMethod", TestInterface5ImplementationV8Internal: :workerExposedStaticMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAll Scripts, 996 V8DOMConfiguration::installMethod(isolate, instanceTemplate, prototypeTe mplate, functionTemplate, defaultSignature, v8::None, workerExposedStaticMethodM ethodConfiguration);
999 };
1000 V8DOMConfiguration::installMethod(isolate, functionTemplate, v8::Local<v 8::Signature>(), v8::None, workerExposedStaticMethodMethodConfiguration);
1001 } 997 }
1002 if (context && (context->isDocument())) { 998 if (context && (context->isDocument())) {
1003 const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodM ethodConfiguration = { 999 const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodM ethodConfiguration = {"windowExposedStaticMethod", TestInterface5ImplementationV 8Internal::windowExposedStaticMethodMethodCallback, 0, 0, V8DOMConfiguration::Ex posedToAllScripts, V8DOMConfiguration::OnInterface};
1004 "windowExposedStaticMethod", TestInterface5ImplementationV8Internal: :windowExposedStaticMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAll Scripts, 1000 V8DOMConfiguration::installMethod(isolate, instanceTemplate, prototypeTe mplate, functionTemplate, defaultSignature, v8::None, windowExposedStaticMethodM ethodConfiguration);
1005 };
1006 V8DOMConfiguration::installMethod(isolate, functionTemplate, v8::Local<v 8::Signature>(), v8::None, windowExposedStaticMethodMethodConfiguration);
1007 } 1001 }
1008 const V8DOMConfiguration::MethodConfiguration toStringMethodConfiguration = { 1002 const V8DOMConfiguration::MethodConfiguration toStringMethodConfiguration = {"toString", TestInterface5ImplementationV8Internal::toStringMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
1009 "toString", TestInterface5ImplementationV8Internal::toStringMethodCallba ck, 0, 0, V8DOMConfiguration::ExposedToAllScripts, 1003 V8DOMConfiguration::installMethod(isolate, instanceTemplate, prototypeTempla te, functionTemplate, defaultSignature, static_cast<v8::PropertyAttribute>(v8::D ontDelete | v8::DontEnum), toStringMethodConfiguration);
1010 };
1011 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignatu re, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum), toStringM ethodConfiguration);
1012 1004
1013 // Custom toString template 1005 // Custom toString template
1014 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate()); 1006 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate());
1015 } 1007 }
1016 1008
1017 v8::Local<v8::FunctionTemplate> V8TestInterface5::domTemplate(v8::Isolate* isola te) 1009 v8::Local<v8::FunctionTemplate> V8TestInterface5::domTemplate(v8::Isolate* isola te)
1018 { 1010 {
1019 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI nfo*>(&wrapperTypeInfo), installV8TestInterface5Template); 1011 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI nfo*>(&wrapperTypeInfo), installV8TestInterface5Template);
1020 } 1012 }
1021 1013
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 scriptWrappable->toImpl<TestInterface5Implementation>()->ref(); 1068 scriptWrappable->toImpl<TestInterface5Implementation>()->ref();
1077 } 1069 }
1078 1070
1079 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable) 1071 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable)
1080 { 1072 {
1081 scriptWrappable->toImpl<TestInterface5Implementation>()->deref(); 1073 scriptWrappable->toImpl<TestInterface5Implementation>()->deref();
1082 } 1074 }
1083 1075
1084 } // namespace blink 1076 } // namespace blink
1085 #endif // ENABLE(CONDITION) 1077 #endif // ENABLE(CONDITION)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698