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

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

Issue 1181113006: bindings: Introduces on_{instance,prototype,interface} in the code generator. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed review comments. Created 5 years, 6 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
« no previous file with comments | « Source/bindings/tests/results/core/V8TestTypedefs.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 TestInterface5Implementation* referencedName = impl->referencedName(); 902 TestInterface5Implementation* referencedName = impl->referencedName();
903 if (referencedName) { 903 if (referencedName) {
904 if (!DOMDataStore::containsWrapper(referencedName, isolate)) 904 if (!DOMDataStore::containsWrapper(referencedName, isolate))
905 referencedName->wrap(isolate, creationContext); 905 referencedName->wrap(isolate, creationContext);
906 DOMDataStore::setWrapperReference(wrapper, referencedName, isolate); 906 DOMDataStore::setWrapperReference(wrapper, referencedName, isolate);
907 } 907 }
908 setObjectGroup(isolate, scriptWrappable, wrapper); 908 setObjectGroup(isolate, scriptWrappable, wrapper);
909 } 909 }
910 910
911 static const V8DOMConfiguration::AttributeConfiguration V8TestInterface5Attribut es[] = { 911 static const V8DOMConfiguration::AttributeConfiguration V8TestInterface5Attribut es[] = {
912 {"testInterfaceConstructorAttribute", v8ConstructorAttributeGetter, TestInte rface5ImplementationV8Internal::testInterfaceConstructorAttributeAttributeSetter Callback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestInterface5::wrapperTypeInfo) , static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute >(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::On Instance}, 912 {"testInterfaceConstructorAttribute", v8ConstructorAttributeGetter, TestInte rface5ImplementationV8Internal::testInterfaceConstructorAttributeAttributeSetter Callback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestInterface5::wrapperTypeInfo) , static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute >(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::On Instance, V8DOMConfiguration::CheckHolder},
913 }; 913 };
914 914
915 static const V8DOMConfiguration::AccessorConfiguration V8TestInterface5Accessors [] = { 915 static const V8DOMConfiguration::AccessorConfiguration V8TestInterface5Accessors [] = {
916 {"testInterfaceAttribute", TestInterface5ImplementationV8Internal::testInter faceAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::te stInterfaceAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurat ion::ExposedToAllScripts, V8DOMConfiguration::CheckHolder}, 916 {"testInterfaceAttribute", TestInterface5ImplementationV8Internal::testInter faceAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::te stInterfaceAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurat ion::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::C heckHolder},
917 {"doubleAttribute", TestInterface5ImplementationV8Internal::doubleAttributeA ttributeGetterCallback, TestInterface5ImplementationV8Internal::doubleAttributeA ttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st atic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScri pts, V8DOMConfiguration::CheckHolder}, 917 {"doubleAttribute", TestInterface5ImplementationV8Internal::doubleAttributeA ttributeGetterCallback, TestInterface5ImplementationV8Internal::doubleAttributeA ttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st atic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScri pts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
918 {"floatAttribute", TestInterface5ImplementationV8Internal::floatAttributeAtt ributeGetterCallback, TestInterface5ImplementationV8Internal::floatAttributeAttr ibuteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati c_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts , V8DOMConfiguration::CheckHolder}, 918 {"floatAttribute", TestInterface5ImplementationV8Internal::floatAttributeAtt ributeGetterCallback, TestInterface5ImplementationV8Internal::floatAttributeAttr ibuteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati c_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts , V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
919 {"unrestrictedDoubleAttribute", TestInterface5ImplementationV8Internal::unre strictedDoubleAttributeAttributeGetterCallback, TestInterface5ImplementationV8In ternal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, 0, static_cast <v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::CheckHolder}, 919 {"unrestrictedDoubleAttribute", TestInterface5ImplementationV8Internal::unre strictedDoubleAttributeAttributeGetterCallback, TestInterface5ImplementationV8In ternal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, 0, static_cast <v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMC onfiguration::CheckHolder},
920 {"unrestrictedFloatAttribute", TestInterface5ImplementationV8Internal::unres trictedFloatAttributeAttributeGetterCallback, TestInterface5ImplementationV8Inte rnal::unrestrictedFloatAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8 ::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8D OMConfiguration::ExposedToAllScripts, V8DOMConfiguration::CheckHolder}, 920 {"unrestrictedFloatAttribute", TestInterface5ImplementationV8Internal::unres trictedFloatAttributeAttributeGetterCallback, TestInterface5ImplementationV8Inte rnal::unrestrictedFloatAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8 ::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8D OMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConf iguration::CheckHolder},
921 {"alwaysExposedAttribute", TestInterface5ImplementationV8Internal::alwaysExp osedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::al waysExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurat ion::ExposedToAllScripts, V8DOMConfiguration::CheckHolder}, 921 {"alwaysExposedAttribute", TestInterface5ImplementationV8Internal::alwaysExp osedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::al waysExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurat ion::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::C heckHolder},
922 }; 922 };
923 923
924 static const V8DOMConfiguration::MethodConfiguration V8TestInterface5Methods[] = { 924 static const V8DOMConfiguration::MethodConfiguration V8TestInterface5Methods[] = {
925 {"voidMethodTestInterfaceEmptyArg", TestInterface5ImplementationV8Internal:: voidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed ToAllScripts}, 925 {"voidMethodTestInterfaceEmptyArg", TestInterface5ImplementationV8Internal:: voidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed ToAllScripts},
926 {"voidMethodDoubleArgFloatArg", TestInterface5ImplementationV8Internal::void MethodDoubleArgFloatArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScr ipts}, 926 {"voidMethodDoubleArgFloatArg", TestInterface5ImplementationV8Internal::void MethodDoubleArgFloatArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScr ipts},
927 {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterface5Implem entationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCal lback, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, 927 {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterface5Implem entationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCal lback, 0, 2, V8DOMConfiguration::ExposedToAllScripts},
928 {"voidMethod", TestInterface5ImplementationV8Internal::voidMethodMethodCallb ack, TestInterface5ImplementationV8Internal::voidMethodMethodCallbackForMainWorl d, 0, V8DOMConfiguration::ExposedToAllScripts}, 928 {"voidMethod", TestInterface5ImplementationV8Internal::voidMethodMethodCallb ack, TestInterface5ImplementationV8Internal::voidMethodMethodCallbackForMainWorl d, 0, V8DOMConfiguration::ExposedToAllScripts},
929 {"alwaysExposedMethod", TestInterface5ImplementationV8Internal::alwaysExpose dMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 929 {"alwaysExposedMethod", TestInterface5ImplementationV8Internal::alwaysExpose dMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
930 {"voidMethodBooleanOrDOMStringArg", TestInterface5ImplementationV8Internal:: voidMethodBooleanOrDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed ToAllScripts}, 930 {"voidMethodBooleanOrDOMStringArg", TestInterface5ImplementationV8Internal:: voidMethodBooleanOrDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed ToAllScripts},
931 {"voidMethodDoubleOrDOMStringArg", TestInterface5ImplementationV8Internal::v oidMethodDoubleOrDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedTo AllScripts}, 931 {"voidMethodDoubleOrDOMStringArg", TestInterface5ImplementationV8Internal::v oidMethodDoubleOrDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedTo AllScripts},
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
1013 TestInterface5Implementation* V8TestInterface5::toImplWithTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value) 1013 TestInterface5Implementation* V8TestInterface5::toImplWithTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value)
1014 { 1014 {
1015 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu e)) : 0; 1015 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu e)) : 0;
1016 } 1016 }
1017 1017
1018 void V8TestInterface5::installConditionallyEnabledProperties(v8::Local<v8::Objec t> instanceObject, v8::Isolate* isolate) 1018 void V8TestInterface5::installConditionallyEnabledProperties(v8::Local<v8::Objec t> instanceObject, v8::Isolate* isolate)
1019 { 1019 {
1020 v8::Local<v8::Object> prototypeObject = v8::Local<v8::Object>::Cast(instance Object->GetPrototype()); 1020 v8::Local<v8::Object> prototypeObject = v8::Local<v8::Object>::Cast(instance Object->GetPrototype());
1021 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext()); 1021 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext());
1022 1022
1023 if (context && (context->isWorkerGlobalScope())) { 1023 if (context && (context->isWorkerGlobalScope())) {
1024 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura tion = {"workerExposedAttribute", TestInterface5ImplementationV8Internal::worker ExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal: :workerExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessC ontrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigu ration::ExposedToAllScripts, V8DOMConfiguration::CheckHolder}; 1024 #error No one is actually using per-member [Exposed] extended attribute. No t supported. Contact to blink-reviews-bindings@ if you need.
1025 V8DOMConfiguration::installAccessor(isolate, prototypeObject, accessorCo nfiguration); 1025 // TODO(yukishiino): Implement the feature again if there is a client.
1026 } 1026 }
1027 if (context && (context->isDocument())) { 1027 if (context && (context->isDocument())) {
1028 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura tion = {"windowExposedAttribute", TestInterface5ImplementationV8Internal::window ExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal: :windowExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessC ontrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigu ration::ExposedToAllScripts, V8DOMConfiguration::CheckHolder}; 1028 #error No one is actually using per-member [Exposed] extended attribute. No t supported. Contact to blink-reviews-bindings@ if you need.
1029 V8DOMConfiguration::installAccessor(isolate, prototypeObject, accessorCo nfiguration); 1029 // TODO(yukishiino): Implement the feature again if there is a client.
1030 } 1030 }
1031 if (context && (context->isWorkerGlobalScope())) {
1032 #error No one is actually using per-member [Exposed] extended attribute. No t supported. Contact to blink-reviews-bindings@ if you need.
1033 // TODO(yukishiino): Implement the feature again if there is a client.
1034 }
1035 if (context && (context->isDocument())) {
1036 #error No one is actually using per-member [Exposed] extended attribute. No t supported. Contact to blink-reviews-bindings@ if you need.
1037 // TODO(yukishiino): Implement the feature again if there is a client.
1038 }
1039 if (context && (context->isWorkerGlobalScope())) {
1040 #error No one is actually using per-member [Exposed] extended attribute. No t supported. Contact to blink-reviews-bindings@ if you need.
1041 // TODO(yukishiino): Implement the feature again if there is a client.
1042 }
1043 if (context && (context->isDocument())) {
1044 #error No one is actually using per-member [Exposed] extended attribute. No t supported. Contact to blink-reviews-bindings@ if you need.
1045 // TODO(yukishiino): Implement the feature again if there is a client.
1046 }
1047 if (context && (context->isDocument() || context->isServiceWorkerGlobalScope())) {
1048 #error No one is actually using per-member [Exposed] extended attribute. No t supported. Contact to blink-reviews-bindings@ if you need.
1049 // TODO(yukishiino): Implement the feature again if there is a client.
1050 }
1031 } 1051 }
1032 1052
1033 void V8TestInterface5::preparePrototypeObject(v8::Isolate* isolate, v8::Local<v8 ::Object> prototypeObject) 1053 void V8TestInterface5::preparePrototypeObject(v8::Isolate* isolate, v8::Local<v8 ::Object> prototypeObject)
1034 { 1054 {
1035 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate)); 1055 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate));
1036 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext()); 1056 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext());
1037 ASSERT(context); 1057 ASSERT(context);
1038 if (context && (context->isWorkerGlobalScope())) { 1058 if (context && (context->isWorkerGlobalScope())) {
1039 v8::Local<v8::FunctionTemplate> functionTemplate = v8::FunctionTemplate: :New(isolate, TestInterface5ImplementationV8Internal::workerExposedMethodMethodC allback, v8Undefined(), defaultSignature, 0); 1059 v8::Local<v8::FunctionTemplate> functionTemplate = v8::FunctionTemplate: :New(isolate, TestInterface5ImplementationV8Internal::workerExposedMethodMethodC allback, v8Undefined(), defaultSignature, 0);
1040 v8::Local<v8::Function> function = ->GetFunction(isolate->GetCurrentCont ext())).ToLocalChecked(); 1060 v8::Local<v8::Function> function = ->GetFunction(isolate->GetCurrentCont ext())).ToLocalChecked();
(...skipping 21 matching lines...) Expand all
1062 scriptWrappable->toImpl<TestInterface5Implementation>()->ref(); 1082 scriptWrappable->toImpl<TestInterface5Implementation>()->ref();
1063 } 1083 }
1064 1084
1065 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable) 1085 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable)
1066 { 1086 {
1067 scriptWrappable->toImpl<TestInterface5Implementation>()->deref(); 1087 scriptWrappable->toImpl<TestInterface5Implementation>()->deref();
1068 } 1088 }
1069 1089
1070 } // namespace blink 1090 } // namespace blink
1071 #endif // ENABLE(CONDITION) 1091 #endif // ENABLE(CONDITION)
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/core/V8TestTypedefs.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698