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

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

Issue 2454133002: [Bindings] Reformat template files for Interface (1/4) (Closed)
Patch Set: Rebase Created 4 years, 1 month 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
« no previous file with comments | « third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.h ('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 // clang-format off 7 // clang-format off
8 #include "V8TestInterfacePartial.h" 8 #include "V8TestInterfacePartial.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 TestInterfaceImplementationPartialV8Internal::partial4StaticVoidMethodMethod (info); 395 TestInterfaceImplementationPartialV8Internal::partial4StaticVoidMethodMethod (info);
396 } 396 }
397 397
398 } // namespace TestInterfaceImplementationPartialV8Internal 398 } // namespace TestInterfaceImplementationPartialV8Internal
399 399
400 const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] = { 400 const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] = {
401 {"partialVoidTestEnumModulesArgMethod", TestInterfaceImplementationPartialV8 Internal::partialVoidTestEnumModulesArgMethodMethodCallback, 0, 1, v8::None, V8D OMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, 401 {"partialVoidTestEnumModulesArgMethod", TestInterfaceImplementationPartialV8 Internal::partialVoidTestEnumModulesArgMethodMethodCallback, 0, 1, v8::None, V8D OMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype},
402 {"unscopableVoidMethod", TestInterfaceImplementationPartialV8Internal::unsco pableVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllS cripts, V8DOMConfiguration::OnPrototype}, 402 {"unscopableVoidMethod", TestInterfaceImplementationPartialV8Internal::unsco pableVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllS cripts, V8DOMConfiguration::OnPrototype},
403 }; 403 };
404 404
405 void V8TestInterfacePartial::installV8TestInterfaceTemplate(v8::Isolate* isolate , const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplat e) 405 void V8TestInterfacePartial::installV8TestInterfaceTemplate(v8::Isolate* isolate , const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplat e) {
406 { 406 // Initialize the interface object's template.
407 // Initialize the interface object's template. 407 V8TestInterface::installV8TestInterfaceTemplate(isolate, world, interfaceTempl ate);
408 V8TestInterface::installV8TestInterfaceTemplate(isolate, world, interfaceTem plate); 408 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp late);
409 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTe mplate); 409 ALLOW_UNUSED_LOCAL(signature);
410 ALLOW_UNUSED_LOCAL(signature); 410 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTe mplate();
411 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->Instance Template(); 411 ALLOW_UNUSED_LOCAL(instanceTemplate);
412 ALLOW_UNUSED_LOCAL(instanceTemplate); 412 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototype Template();
413 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototy peTemplate(); 413 ALLOW_UNUSED_LOCAL(prototypeTemplate);
414 ALLOW_UNUSED_LOCAL(prototypeTemplate); 414 // Register DOM constants, attributes and operations.
415 // Register DOM constants, attributes and operations. 415 if (RuntimeEnabledFeatures::featureNameEnabled()) {
416 if (RuntimeEnabledFeatures::featureNameEnabled()) { 416 const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceConstants[] = {
417 const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceConstants [] = { 417 {"PARTIAL3_UNSIGNED_SHORT", 0, 0, V8DOMConfiguration::ConstantTypeUnsi gnedShort},
418 {"PARTIAL3_UNSIGNED_SHORT", 0, 0, V8DOMConfiguration::ConstantTypeUn signedShort}, 418 };
419 }; 419 V8DOMConfiguration::installConstants(isolate, interfaceTemplate, prototype Template, V8TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants));
420 V8DOMConfiguration::installConstants(isolate, interfaceTemplate, prototy peTemplate, V8TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants) ); 420 V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, proto typeTemplate, interfaceTemplate, signature, V8TestInterfaceMethods, WTF_ARRAY_LE NGTH(V8TestInterfaceMethods));
421 V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, pro totypeTemplate, interfaceTemplate, signature, V8TestInterfaceMethods, WTF_ARRAY_ LENGTH(V8TestInterfaceMethods)); 421 }
422 }
423 } 422 }
424 423
425 void V8TestInterfacePartial::installOriginTrialPartialFeature(v8::Isolate* isola te, const DOMWrapperWorld& world, v8::Local<v8::Object> instance, v8::Local<v8:: Object> prototype, v8::Local<v8::Function> interface) 424 void V8TestInterfacePartial::installOriginTrialPartialFeature(v8::Isolate* isola te, const DOMWrapperWorld& world, v8::Local<v8::Object> instance, v8::Local<v8:: Object> prototype, v8::Local<v8::Function> interface) {
426 { 425 v8::Local<v8::FunctionTemplate> interfaceTemplate = V8TestInterface::wrapperTy peInfo.domTemplate(isolate, world);
427 v8::Local<v8::FunctionTemplate> interfaceTemplate = V8TestInterface::wrapper TypeInfo.domTemplate(isolate, world); 426 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp late);
428 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTe mplate); 427 ALLOW_UNUSED_LOCAL(signature);
429 ALLOW_UNUSED_LOCAL(signature); 428 const V8DOMConfiguration::AccessorConfiguration accessorpartial4LongAttributeC onfiguration = {"partial4LongAttribute", TestInterfaceImplementationPartialV8Int ernal::partial4LongAttributeAttributeGetterCallback, TestInterfaceImplementation PartialV8Internal::partial4LongAttributeAttributeSetterCallback, 0, 0, 0, v8::DE FAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Exposed ToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
430 const V8DOMConfiguration::AccessorConfiguration accessorpartial4LongAttribut eConfiguration = \ 429 V8DOMConfiguration::installAccessor(isolate, world, instance, prototype, inter face, signature, accessorpartial4LongAttributeConfiguration);
431 {"partial4LongAttribute", TestInterfaceImplementationPartialV8Internal:: partial4LongAttributeAttributeGetterCallback, TestInterfaceImplementationPartial V8Internal::partial4LongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllSc ripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; 430 const V8DOMConfiguration::AccessorConfiguration accessorpartial4StaticLongAttr ibuteConfiguration = {"partial4StaticLongAttribute", TestInterfaceImplementation PartialV8Internal::partial4StaticLongAttributeAttributeGetterCallback, TestInter faceImplementationPartialV8Internal::partial4StaticLongAttributeAttributeSetterC allback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8D OMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConf iguration::CheckHolder};
432 V8DOMConfiguration::installAccessor(isolate, world, instance, prototype, int erface, signature, accessorpartial4LongAttributeConfiguration); 431 V8DOMConfiguration::installAccessor(isolate, world, instance, prototype, inter face, signature, accessorpartial4StaticLongAttributeConfiguration);
433 const V8DOMConfiguration::AccessorConfiguration accessorpartial4StaticLongAt tributeConfiguration = \ 432 const V8DOMConfiguration::ConstantConfiguration constantPartial4UnsignedShortC onfiguration = {"PARTIAL4_UNSIGNED_SHORT", 4, 0, V8DOMConfiguration::ConstantTyp eUnsignedShort};
434 {"partial4StaticLongAttribute", TestInterfaceImplementationPartialV8Inte rnal::partial4StaticLongAttributeAttributeGetterCallback, TestInterfaceImplement ationPartialV8Internal::partial4StaticLongAttributeAttributeSetterCallback, 0, 0 , 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurati on::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::Ch eckHolder}; 433 V8DOMConfiguration::installConstant(isolate, interface, prototype, constantPar tial4UnsignedShortConfiguration);
435 V8DOMConfiguration::installAccessor(isolate, world, instance, prototype, int erface, signature, accessorpartial4StaticLongAttributeConfiguration); 434 const V8DOMConfiguration::MethodConfiguration methodPartial4StaticvoidmethodCo nfiguration = {"partial4StaticVoidMethod", TestInterfaceImplementationPartialV8I nternal::partial4StaticVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfigurat ion::ExposedToAllScripts, V8DOMConfiguration::OnInterface};
436 const V8DOMConfiguration::ConstantConfiguration constantPartial4UnsignedShor tConfiguration = {"PARTIAL4_UNSIGNED_SHORT", 4, 0, V8DOMConfiguration::ConstantT ypeUnsignedShort}; 435 V8DOMConfiguration::installMethod(isolate, world, instance, prototype, interfa ce, signature, methodPartial4StaticvoidmethodConfiguration);
437 V8DOMConfiguration::installConstant(isolate, interface, prototype, constantP artial4UnsignedShortConfiguration); 436 const V8DOMConfiguration::MethodConfiguration methodPartial4VoidmethodConfigur ation = {"partial4VoidMethod", TestInterfaceImplementationPartialV8Internal::par tial4VoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllS cripts, V8DOMConfiguration::OnPrototype};
438 const V8DOMConfiguration::MethodConfiguration methodPartial4Staticvoidmethod Configuration = {"partial4StaticVoidMethod", TestInterfaceImplementationPartialV 8Internal::partial4StaticVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfigur ation::ExposedToAllScripts, V8DOMConfiguration::OnInterface}; 437 V8DOMConfiguration::installMethod(isolate, world, instance, prototype, interfa ce, signature, methodPartial4VoidmethodConfiguration);
439 V8DOMConfiguration::installMethod(isolate, world, instance, prototype, inter face, signature, methodPartial4StaticvoidmethodConfiguration);
440 const V8DOMConfiguration::MethodConfiguration methodPartial4VoidmethodConfig uration = {"partial4VoidMethod", TestInterfaceImplementationPartialV8Internal::p artial4VoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAl lScripts, V8DOMConfiguration::OnPrototype};
441 V8DOMConfiguration::installMethod(isolate, world, instance, prototype, inter face, signature, methodPartial4VoidmethodConfiguration);
442 } 438 }
443 439
444 void V8TestInterfacePartial::installOriginTrialPartialFeature(ScriptState* scrip tState, v8::Local<v8::Object> instance) 440 void V8TestInterfacePartial::installOriginTrialPartialFeature(ScriptState* scrip tState, v8::Local<v8::Object> instance) {
445 { 441 V8PerContextData* perContextData = V8PerContextData::from(scriptState->context ());
446 V8PerContextData* perContextData = V8PerContextData::from(scriptState->conte xt()); 442 v8::Local<v8::Object> prototype = perContextData->prototypeForType(&V8TestInte rface::wrapperTypeInfo);
447 v8::Local<v8::Object> prototype = perContextData->prototypeForType(&V8TestIn terface::wrapperTypeInfo); 443 v8::Local<v8::Function> interface = perContextData->constructorForType(&V8Test Interface::wrapperTypeInfo);
448 v8::Local<v8::Function> interface = perContextData->constructorForType(&V8Te stInterface::wrapperTypeInfo); 444 ALLOW_UNUSED_LOCAL(interface);
449 ALLOW_UNUSED_LOCAL(interface); 445 installOriginTrialPartialFeature(scriptState->isolate(), scriptState->world(), instance, prototype, interface);
450 installOriginTrialPartialFeature(scriptState->isolate(), scriptState->world( ), instance, prototype, interface);
451 } 446 }
452 447
453 void V8TestInterfacePartial::installOriginTrialPartialFeature(ScriptState* scrip tState) 448 void V8TestInterfacePartial::installOriginTrialPartialFeature(ScriptState* scrip tState) {
454 { 449 installOriginTrialPartialFeature(scriptState, v8::Local<v8::Object>());
455 installOriginTrialPartialFeature(scriptState, v8::Local<v8::Object>());
456 } 450 }
457 void V8TestInterfacePartial::preparePrototypeAndInterfaceObject(v8::Local<v8::Co ntext> context, const DOMWrapperWorld& world, v8::Local<v8::Object> prototypeObj ect, v8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> in terfaceTemplate) 451 void V8TestInterfacePartial::preparePrototypeAndInterfaceObject(v8::Local<v8::Co ntext> context, const DOMWrapperWorld& world, v8::Local<v8::Object> prototypeObj ect, v8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> in terfaceTemplate) {
458 {
459 #error No one is currently using a partial interface with context-dependent prop erties. If you\'re planning to use it, please consult with the binding team: <b link-reviews-bindings@chromium.org> 452 #error No one is currently using a partial interface with context-dependent prop erties. If you\'re planning to use it, please consult with the binding team: <b link-reviews-bindings@chromium.org>
460 V8TestInterface::preparePrototypeAndInterfaceObject(context, world, prototyp eObject, interfaceObject, interfaceTemplate); 453 V8TestInterface::preparePrototypeAndInterfaceObject(context, world, prototypeO bject, interfaceObject, interfaceTemplate);
461 v8::Isolate* isolate = context->GetIsolate(); 454 v8::Isolate* isolate = context->GetIsolate();
462 v8::Local<v8::Name> unscopablesSymbol(v8::Symbol::GetUnscopables(isolate)); 455 v8::Local<v8::Name> unscopablesSymbol(v8::Symbol::GetUnscopables(isolate));
463 v8::Local<v8::Object> unscopables; 456 v8::Local<v8::Object> unscopables;
464 if (v8CallBoolean(prototypeObject->HasOwnProperty(context, unscopablesSymbol ))) 457 if (v8CallBoolean(prototypeObject->HasOwnProperty(context, unscopablesSymbol)) )
465 unscopables = prototypeObject->Get(context, unscopablesSymbol).ToLocalCh ecked().As<v8::Object>(); 458 unscopables = prototypeObject->Get(context, unscopablesSymbol).ToLocalChecke d().As<v8::Object>();
466 else 459 else
467 unscopables = v8::Object::New(isolate); 460 unscopables = v8::Object::New(isolate);
468 unscopables->CreateDataProperty(context, v8AtomicString(isolate, "unscopable VoidMethod"), v8::True(isolate)).FromJust(); 461 unscopables->CreateDataProperty(context, v8AtomicString(isolate, "unscopableVo idMethod"), v8::True(isolate)).FromJust();
469 prototypeObject->CreateDataProperty(context, unscopablesSymbol, unscopables) .FromJust(); 462 prototypeObject->CreateDataProperty(context, unscopablesSymbol, unscopables).F romJust();
470 } 463 }
471 464
472 void V8TestInterfacePartial::initialize() 465 void V8TestInterfacePartial::initialize() {
473 { 466 // Should be invoked from ModulesInitializer.
474 // Should be invoked from ModulesInitializer. 467 V8TestInterface::updateWrapperTypeInfo(
475 V8TestInterface::updateWrapperTypeInfo( 468 &V8TestInterfacePartial::installV8TestInterfaceTemplate,
476 &V8TestInterfacePartial::installV8TestInterfaceTemplate, 469 V8TestInterfacePartial::preparePrototypeAndInterfaceObject);
477 V8TestInterfacePartial::preparePrototypeAndInterfaceObject); 470 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface(&T estInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod);
478 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface( &TestInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod); 471 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInterf ace(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOverlo adMethod);
479 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInte rface(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOver loadMethod); 472 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterface (&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMeth od);
480 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterfa ce(&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMe thod); 473 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialInt erface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodPartial OverloadMethod);
481 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialI nterface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodParti alOverloadMethod); 474 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestInte rfaceImplementationPartialV8Internal::partial2VoidMethodMethod);
482 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestIn terfaceImplementationPartialV8Internal::partial2VoidMethodMethod); 475 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(&Te stInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod);
483 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(& TestInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod);
484 } 476 }
485 477
486 } // namespace blink 478 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698