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

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

Issue 2446213002: [Bindings] [Reformat] Reformat template files (Closed)
Patch Set: Rebase (Split out Callbackfunctions) 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
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 "V8TestInterface2Partial.h" 8 #include "V8TestInterface2Partial.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
11 #include "bindings/core/v8/GeneratedCodeHelper.h" 11 #include "bindings/core/v8/GeneratedCodeHelper.h"
12 #include "bindings/core/v8/V8DOMConfiguration.h" 12 #include "bindings/core/v8/V8DOMConfiguration.h"
13 #include "bindings/core/v8/V8GCController.h" 13 #include "bindings/core/v8/V8GCController.h"
14 #include "bindings/core/v8/V8ObjectConstructor.h" 14 #include "bindings/core/v8/V8ObjectConstructor.h"
15 #include "bindings/core/v8/V8TestInterface2.h" 15 #include "bindings/core/v8/V8TestInterface2.h"
16 #include "bindings/tests/idls/modules/TestInterface2Partial.h" 16 #include "bindings/tests/idls/modules/TestInterface2Partial.h"
17 #include "bindings/tests/idls/modules/TestInterface2Partial2.h" 17 #include "bindings/tests/idls/modules/TestInterface2Partial2.h"
18 #include "core/dom/Document.h" 18 #include "core/dom/Document.h"
19 #include "core/dom/Element.h" 19 #include "core/dom/Element.h"
20 #include "platform/RuntimeEnabledFeatures.h" 20 #include "platform/RuntimeEnabledFeatures.h"
21 #include "wtf/GetPtr.h" 21 #include "wtf/GetPtr.h"
22 #include "wtf/RefPtr.h" 22 #include "wtf/RefPtr.h"
23 23
24 namespace blink { 24 namespace blink {
25 25
26 namespace TestInterface2PartialV8Internal { 26 namespace TestInterface2PartialV8Internal {
27 27
28 static void voidMethodPartial1Method(const v8::FunctionCallbackInfo<v8::Value>& info) 28 static void voidMethodPartial1Method(const v8::FunctionCallbackInfo<v8::Value>& info) {
29 { 29 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder());
30 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder());
31 30
32 if (UNLIKELY(info.Length() < 1)) { 31 if (UNLIKELY(info.Length() < 1)) {
33 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodPartial1", "TestInterface2", ExceptionMessages::notEno ughArguments(1, info.Length()))); 32 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::faile dToExecute("voidMethodPartial1", "TestInterface2", ExceptionMessages::notEnoughA rguments(1, info.Length())));
34 return; 33 return;
35 } 34 }
36 35
37 V8StringResource<> value; 36 V8StringResource<> value;
38 value = info[0]; 37 value = info[0];
39 if (!value.prepare()) 38 if (!value.prepare())
40 return; 39 return;
41 40
42 TestInterface2Partial::voidMethodPartial1(*impl, value); 41 TestInterface2Partial::voidMethodPartial1(*impl, value);
43 } 42 }
44 43
45 void voidMethodPartial1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 44 void voidMethodPartial1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
46 { 45 TestInterface2PartialV8Internal::voidMethodPartial1Method(info);
47 TestInterface2PartialV8Internal::voidMethodPartial1Method(info);
48 } 46 }
49 47
50 static void voidMethodPartial2Method(const v8::FunctionCallbackInfo<v8::Value>& info) 48 static void voidMethodPartial2Method(const v8::FunctionCallbackInfo<v8::Value>& info) {
51 { 49 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder());
52 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder());
53 50
54 if (UNLIKELY(info.Length() < 1)) { 51 if (UNLIKELY(info.Length() < 1)) {
55 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodPartial2", "TestInterface2", ExceptionMessages::notEno ughArguments(1, info.Length()))); 52 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::faile dToExecute("voidMethodPartial2", "TestInterface2", ExceptionMessages::notEnoughA rguments(1, info.Length())));
56 return; 53 return;
57 } 54 }
58 55
59 V8StringResource<> value; 56 V8StringResource<> value;
60 value = info[0]; 57 value = info[0];
61 if (!value.prepare()) 58 if (!value.prepare())
62 return; 59 return;
63 60
64 TestInterface2Partial2::voidMethodPartial2(*impl, value); 61 TestInterface2Partial2::voidMethodPartial2(*impl, value);
65 } 62 }
66 63
67 void voidMethodPartial2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 64 void voidMethodPartial2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
68 { 65 TestInterface2PartialV8Internal::voidMethodPartial2Method(info);
69 TestInterface2PartialV8Internal::voidMethodPartial2Method(info);
70 } 66 }
71 67
72 } // namespace TestInterface2PartialV8Internal 68 } // namespace TestInterface2PartialV8Internal
73 69
74 const V8DOMConfiguration::MethodConfiguration V8TestInterface2Methods[] = { 70 const V8DOMConfiguration::MethodConfiguration V8TestInterface2Methods[] = {
75 {"voidMethodPartial2", TestInterface2PartialV8Internal::voidMethodPartial2Me thodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConf iguration::OnPrototype}, 71 {"voidMethodPartial2", TestInterface2PartialV8Internal::voidMethodPartial2Me thodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConf iguration::OnPrototype},
76 }; 72 };
77 73
78 void V8TestInterface2Partial::installV8TestInterface2Template(v8::Isolate* isola te, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTempl ate) 74 void V8TestInterface2Partial::installV8TestInterface2Template(v8::Isolate* isola te, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTempl ate) {
79 { 75 // Initialize the interface object's template.
80 // Initialize the interface object's template. 76 V8TestInterface2::installV8TestInterface2Template(isolate, world, interfaceTem plate);
81 V8TestInterface2::installV8TestInterface2Template(isolate, world, interfaceT emplate); 77 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp late);
82 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTe mplate); 78 ALLOW_UNUSED_LOCAL(signature);
83 ALLOW_UNUSED_LOCAL(signature); 79 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTe mplate();
84 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->Instance Template(); 80 ALLOW_UNUSED_LOCAL(instanceTemplate);
85 ALLOW_UNUSED_LOCAL(instanceTemplate); 81 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototype Template();
86 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototy peTemplate(); 82 ALLOW_UNUSED_LOCAL(prototypeTemplate);
87 ALLOW_UNUSED_LOCAL(prototypeTemplate); 83 // Register DOM constants, attributes and operations.
88 // Register DOM constants, attributes and operations. 84 V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, prototype Template, interfaceTemplate, signature, V8TestInterface2Methods, WTF_ARRAY_LENGT H(V8TestInterface2Methods));
89 V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, prototy peTemplate, interfaceTemplate, signature, V8TestInterface2Methods, WTF_ARRAY_LEN GTH(V8TestInterface2Methods));
90 85
91 if (RuntimeEnabledFeatures::interface2PartialFeatureNameEnabled()) { 86 if (RuntimeEnabledFeatures::interface2PartialFeatureNameEnabled()) {
92 const V8DOMConfiguration::MethodConfiguration voidMethodPartial1MethodCo nfiguration = {"voidMethodPartial1", TestInterface2PartialV8Internal::voidMethod Partial1MethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}; 87 const V8DOMConfiguration::MethodConfiguration voidMethodPartial1MethodConf iguration = {"voidMethodPartial1", TestInterface2PartialV8Internal::voidMethodPa rtial1MethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V 8DOMConfiguration::OnPrototype};
93 V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prot otypeTemplate, interfaceTemplate, signature, voidMethodPartial1MethodConfigurati on); 88 V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, protot ypeTemplate, interfaceTemplate, signature, voidMethodPartial1MethodConfiguration );
94 } 89 }
95 } 90 }
96 91
97 void V8TestInterface2Partial::initialize() 92 void V8TestInterface2Partial::initialize() {
98 { 93 // Should be invoked from ModulesInitializer.
99 // Should be invoked from ModulesInitializer. 94 V8TestInterface2::updateWrapperTypeInfo(
100 V8TestInterface2::updateWrapperTypeInfo( 95 &V8TestInterface2Partial::installV8TestInterface2Template,
101 &V8TestInterface2Partial::installV8TestInterface2Template, 96 nullptr);
102 nullptr);
103 } 97 }
104 98
105 } // namespace blink 99 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698