| 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/partial_interface.cpp.tmpl | 9 // third_party/WebKit/Source/bindings/templates/partial_interface.cpp.tmpl |
| 10 | 10 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 } | 38 } |
| 39 | 39 |
| 40 V8StringResource<> value; | 40 V8StringResource<> value; |
| 41 value = info[0]; | 41 value = info[0]; |
| 42 if (!value.prepare()) | 42 if (!value.prepare()) |
| 43 return; | 43 return; |
| 44 | 44 |
| 45 TestInterface2Partial::voidMethodPartial1(*impl, value); | 45 TestInterface2Partial::voidMethodPartial1(*impl, value); |
| 46 } | 46 } |
| 47 | 47 |
| 48 void voidMethodPartial1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>
& info) { | |
| 49 TestInterface2PartialV8Internal::voidMethodPartial1Method(info); | |
| 50 } | |
| 51 | |
| 52 static void voidMethodPartial2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) { | 48 static void voidMethodPartial2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) { |
| 53 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); | 49 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); |
| 54 | 50 |
| 55 if (UNLIKELY(info.Length() < 1)) { | 51 if (UNLIKELY(info.Length() < 1)) { |
| 56 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::faile
dToExecute("voidMethodPartial2", "TestInterface2", ExceptionMessages::notEnoughA
rguments(1, info.Length()))); | 52 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::faile
dToExecute("voidMethodPartial2", "TestInterface2", ExceptionMessages::notEnoughA
rguments(1, info.Length()))); |
| 57 return; | 53 return; |
| 58 } | 54 } |
| 59 | 55 |
| 60 V8StringResource<> value; | 56 V8StringResource<> value; |
| 61 value = info[0]; | 57 value = info[0]; |
| 62 if (!value.prepare()) | 58 if (!value.prepare()) |
| 63 return; | 59 return; |
| 64 | 60 |
| 65 TestInterface2Partial2::voidMethodPartial2(*impl, value); | 61 TestInterface2Partial2::voidMethodPartial2(*impl, value); |
| 66 } | 62 } |
| 67 | 63 |
| 68 void voidMethodPartial2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>
& info) { | |
| 69 TestInterface2PartialV8Internal::voidMethodPartial2Method(info); | |
| 70 } | |
| 71 | |
| 72 } // namespace TestInterface2PartialV8Internal | 64 } // namespace TestInterface2PartialV8Internal |
| 73 | 65 |
| 66 void V8TestInterface2Partial::voidMethodPartial1MethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) { |
| 67 TestInterface2PartialV8Internal::voidMethodPartial1Method(info); |
| 68 } |
| 69 |
| 70 void V8TestInterface2Partial::voidMethodPartial2MethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) { |
| 71 TestInterface2PartialV8Internal::voidMethodPartial2Method(info); |
| 72 } |
| 73 |
| 74 const V8DOMConfiguration::MethodConfiguration V8TestInterface2Methods[] = { | 74 const V8DOMConfiguration::MethodConfiguration V8TestInterface2Methods[] = { |
| 75 {"voidMethodPartial2", TestInterface2PartialV8Internal::voidMethodPartial2Me
thodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguratio
n::CheckHolder}, | 75 {"voidMethodPartial2", V8TestInterface2Partial::voidMethodPartial2MethodCall
back, nullptr, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration:
:CheckHolder}, |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 void V8TestInterface2Partial::installV8TestInterface2Template(v8::Isolate* isola
te, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTempl
ate) { | 78 void V8TestInterface2Partial::installV8TestInterface2Template(v8::Isolate* isola
te, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTempl
ate) { |
| 79 // Initialize the interface object's template. | 79 // Initialize the interface object's template. |
| 80 V8TestInterface2::installV8TestInterface2Template(isolate, world, interfaceTem
plate); | 80 V8TestInterface2::installV8TestInterface2Template(isolate, world, interfaceTem
plate); |
| 81 | 81 |
| 82 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp
late); | 82 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp
late); |
| 83 ALLOW_UNUSED_LOCAL(signature); | 83 ALLOW_UNUSED_LOCAL(signature); |
| 84 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTe
mplate(); | 84 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTe
mplate(); |
| 85 ALLOW_UNUSED_LOCAL(instanceTemplate); | 85 ALLOW_UNUSED_LOCAL(instanceTemplate); |
| 86 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototype
Template(); | 86 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototype
Template(); |
| 87 ALLOW_UNUSED_LOCAL(prototypeTemplate); | 87 ALLOW_UNUSED_LOCAL(prototypeTemplate); |
| 88 | 88 |
| 89 // Register DOM constants, attributes and operations. | 89 // Register DOM constants, attributes and operations. |
| 90 V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, prototype
Template, interfaceTemplate, signature, V8TestInterface2Methods, WTF_ARRAY_LENGT
H(V8TestInterface2Methods)); | 90 V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, prototype
Template, interfaceTemplate, signature, V8TestInterface2Methods, WTF_ARRAY_LENGT
H(V8TestInterface2Methods)); |
| 91 | 91 |
| 92 if (RuntimeEnabledFeatures::interface2PartialFeatureNameEnabled()) { | 92 if (RuntimeEnabledFeatures::interface2PartialFeatureNameEnabled()) { |
| 93 const V8DOMConfiguration::MethodConfiguration voidMethodPartial1MethodConfig
uration = {"voidMethodPartial1", TestInterface2PartialV8Internal::voidMethodPart
ial1MethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfig
uration::CheckHolder}; | 93 const V8DOMConfiguration::MethodConfiguration voidMethodPartial1MethodConfig
uration = {"voidMethodPartial1", V8TestInterface2Partial::voidMethodPartial1Meth
odCallback, nullptr, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfigur
ation::CheckHolder}; |
| 94 V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototyp
eTemplate, interfaceTemplate, signature, voidMethodPartial1MethodConfiguration); | 94 V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototyp
eTemplate, interfaceTemplate, signature, voidMethodPartial1MethodConfiguration); |
| 95 } | 95 } |
| 96 } | 96 } |
| 97 | 97 |
| 98 void V8TestInterface2Partial::initialize() { | 98 void V8TestInterface2Partial::initialize() { |
| 99 // Should be invoked from ModulesInitializer. | 99 // Should be invoked from ModulesInitializer. |
| 100 V8TestInterface2::updateWrapperTypeInfo( | 100 V8TestInterface2::updateWrapperTypeInfo( |
| 101 &V8TestInterface2Partial::installV8TestInterface2Template, | 101 &V8TestInterface2Partial::installV8TestInterface2Template, |
| 102 nullptr); | 102 nullptr); |
| 103 } | 103 } |
| 104 | 104 |
| 105 } // namespace blink | 105 } // namespace blink |
| OLD | NEW |