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/interface.cpp.tmpl | 9 // third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl |
10 | 10 |
(...skipping 1868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1879 } | 1879 } |
1880 break; | 1880 break; |
1881 case 1: | 1881 case 1: |
1882 break; | 1882 break; |
1883 } | 1883 } |
1884 | 1884 |
1885 DCHECK(partial2StaticVoidMethodMethodForPartialInterface); | 1885 DCHECK(partial2StaticVoidMethodMethodForPartialInterface); |
1886 (partial2StaticVoidMethodMethodForPartialInterface)(info); | 1886 (partial2StaticVoidMethodMethodForPartialInterface)(info); |
1887 } | 1887 } |
1888 | 1888 |
| 1889 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { |
| 1890 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kExecutionCon
text, "TestInterface", "keys"); |
| 1891 |
| 1892 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
| 1893 |
| 1894 ScriptState* scriptState = ScriptState::ForReceiverObject(info); |
| 1895 |
| 1896 Iterator* result = impl->keysForBinding(scriptState, exceptionState); |
| 1897 if (exceptionState.HadException()) { |
| 1898 return; |
| 1899 } |
| 1900 V8SetReturnValue(info, result); |
| 1901 } |
| 1902 |
| 1903 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { |
| 1904 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kExecutionCon
text, "TestInterface", "values"); |
| 1905 |
| 1906 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
| 1907 |
| 1908 ScriptState* scriptState = ScriptState::ForReceiverObject(info); |
| 1909 |
| 1910 Iterator* result = impl->valuesForBinding(scriptState, exceptionState); |
| 1911 if (exceptionState.HadException()) { |
| 1912 return; |
| 1913 } |
| 1914 V8SetReturnValue(info, result); |
| 1915 } |
| 1916 |
| 1917 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { |
| 1918 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kExecutionCon
text, "TestInterface", "entries"); |
| 1919 |
| 1920 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
| 1921 |
| 1922 ScriptState* scriptState = ScriptState::ForReceiverObject(info); |
| 1923 |
| 1924 Iterator* result = impl->entriesForBinding(scriptState, exceptionState); |
| 1925 if (exceptionState.HadException()) { |
| 1926 return; |
| 1927 } |
| 1928 V8SetReturnValue(info, result); |
| 1929 } |
| 1930 |
| 1931 static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { |
| 1932 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kExecutionCon
text, "TestInterface", "forEach"); |
| 1933 |
| 1934 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
| 1935 |
| 1936 ScriptState* scriptState = ScriptState::ForReceiverObject(info); |
| 1937 |
| 1938 if (UNLIKELY(info.Length() < 1)) { |
| 1939 exceptionState.ThrowTypeError(ExceptionMessages::NotEnoughArguments(1, info.
Length())); |
| 1940 return; |
| 1941 } |
| 1942 |
| 1943 ScriptValue callback; |
| 1944 ScriptValue thisArg; |
| 1945 if (!(info[0]->IsObject() && v8::Local<v8::Object>::Cast(info[0])->IsCallable(
))) { |
| 1946 exceptionState.ThrowTypeError("The callback provided as parameter 1 is not a
function."); |
| 1947 |
| 1948 return; |
| 1949 } |
| 1950 callback = ScriptValue(ScriptState::Current(info.GetIsolate()), info[0]); |
| 1951 |
| 1952 thisArg = ScriptValue(ScriptState::Current(info.GetIsolate()), info[1]); |
| 1953 |
| 1954 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.Holder()),
callback, thisArg, exceptionState); |
| 1955 if (exceptionState.HadException()) { |
| 1956 return; |
| 1957 } |
| 1958 } |
| 1959 |
1889 static void toJSONMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { | 1960 static void toJSONMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { |
1890 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kExecutionCon
text, "TestInterface", "toJSON"); | 1961 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kExecutionCon
text, "TestInterface", "toJSON"); |
1891 | 1962 |
1892 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1963 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
1893 | 1964 |
1894 ScriptState* scriptState = ScriptState::ForReceiverObject(info); | 1965 ScriptState* scriptState = ScriptState::ForReceiverObject(info); |
1895 | 1966 |
1896 ScriptValue result = impl->toJSONForBinding(scriptState, exceptionState); | 1967 ScriptValue result = impl->toJSONForBinding(scriptState, exceptionState); |
1897 if (exceptionState.HadException()) { | 1968 if (exceptionState.HadException()) { |
1898 return; | 1969 return; |
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2667 } | 2738 } |
2668 | 2739 |
2669 void V8TestInterface::partial2VoidMethodMethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) { | 2740 void V8TestInterface::partial2VoidMethodMethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) { |
2670 TestInterfaceImplementationV8Internal::partial2VoidMethodMethod(info); | 2741 TestInterfaceImplementationV8Internal::partial2VoidMethodMethod(info); |
2671 } | 2742 } |
2672 | 2743 |
2673 void V8TestInterface::partial2StaticVoidMethodMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) { | 2744 void V8TestInterface::partial2StaticVoidMethodMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) { |
2674 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethod(info); | 2745 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethod(info); |
2675 } | 2746 } |
2676 | 2747 |
| 2748 void V8TestInterface::keysMethodCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& info) { |
| 2749 TestInterfaceImplementationV8Internal::keysMethod(info); |
| 2750 } |
| 2751 |
| 2752 void V8TestInterface::valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) { |
| 2753 TestInterfaceImplementationV8Internal::valuesMethod(info); |
| 2754 } |
| 2755 |
| 2756 void V8TestInterface::entriesMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) { |
| 2757 TestInterfaceImplementationV8Internal::entriesMethod(info); |
| 2758 } |
| 2759 |
| 2760 void V8TestInterface::forEachMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) { |
| 2761 TestInterfaceImplementationV8Internal::forEachMethod(info); |
| 2762 } |
| 2763 |
2677 void V8TestInterface::toJSONMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) { | 2764 void V8TestInterface::toJSONMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) { |
2678 TestInterfaceImplementationV8Internal::toJSONMethod(info); | 2765 TestInterfaceImplementationV8Internal::toJSONMethod(info); |
2679 } | 2766 } |
2680 | 2767 |
2681 void V8TestInterface::toStringMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) { | 2768 void V8TestInterface::toStringMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) { |
2682 TestInterfaceImplementationV8Internal::toStringMethod(info); | 2769 TestInterfaceImplementationV8Internal::toStringMethod(info); |
2683 } | 2770 } |
2684 | 2771 |
2685 void V8TestInterface::iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) { | 2772 void V8TestInterface::iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) { |
2686 TestInterfaceImplementationV8Internal::iteratorMethod(info); | 2773 TestInterfaceImplementationV8Internal::iteratorMethod(info); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2792 {"implementsCustomVoidMethod", V8TestInterface::implementsCustomVoidMethodMe
thodCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration:
:kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWo
rlds}, | 2879 {"implementsCustomVoidMethod", V8TestInterface::implementsCustomVoidMethodMe
thodCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration:
:kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWo
rlds}, |
2793 {"implementsStaticVoidMethod", V8TestInterface::implementsStaticVoidMethodMe
thodCallback, 0, v8::None, V8DOMConfiguration::kOnInterface, V8DOMConfiguration:
:kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWo
rlds}, | 2880 {"implementsStaticVoidMethod", V8TestInterface::implementsStaticVoidMethodMe
thodCallback, 0, v8::None, V8DOMConfiguration::kOnInterface, V8DOMConfiguration:
:kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWo
rlds}, |
2794 {"implements3VoidMethod", V8TestInterface::implements3VoidMethodMethodCallba
ck, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHol
der, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}, | 2881 {"implements3VoidMethod", V8TestInterface::implements3VoidMethodMethodCallba
ck, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHol
der, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}, |
2795 {"implements3StaticVoidMethod", V8TestInterface::implements3StaticVoidMethod
MethodCallback, 0, v8::None, V8DOMConfiguration::kOnInterface, V8DOMConfiguratio
n::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAll
Worlds}, | 2882 {"implements3StaticVoidMethod", V8TestInterface::implements3StaticVoidMethod
MethodCallback, 0, v8::None, V8DOMConfiguration::kOnInterface, V8DOMConfiguratio
n::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAll
Worlds}, |
2796 {"voidMethodPartialOverload", V8TestInterface::voidMethodPartialOverloadMeth
odCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::k
CheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorl
ds}, | 2883 {"voidMethodPartialOverload", V8TestInterface::voidMethodPartialOverloadMeth
odCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::k
CheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorl
ds}, |
2797 {"staticVoidMethodPartialOverload", V8TestInterface::staticVoidMethodPartial
OverloadMethodCallback, 0, v8::None, V8DOMConfiguration::kOnInterface, V8DOMConf
iguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfigurati
on::kAllWorlds}, | 2884 {"staticVoidMethodPartialOverload", V8TestInterface::staticVoidMethodPartial
OverloadMethodCallback, 0, v8::None, V8DOMConfiguration::kOnInterface, V8DOMConf
iguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfigurati
on::kAllWorlds}, |
2798 {"promiseMethodPartialOverload", V8TestInterface::promiseMethodPartialOverlo
adMethodCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfigurat
ion::kDoNotCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguratio
n::kAllWorlds}, | 2885 {"promiseMethodPartialOverload", V8TestInterface::promiseMethodPartialOverlo
adMethodCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfigurat
ion::kDoNotCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguratio
n::kAllWorlds}, |
2799 {"staticPromiseMethodPartialOverload", V8TestInterface::staticPromiseMethodP
artialOverloadMethodCallback, 0, v8::None, V8DOMConfiguration::kOnInterface, V8D
OMConfiguration::kDoNotCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOM
Configuration::kAllWorlds}, | 2886 {"staticPromiseMethodPartialOverload", V8TestInterface::staticPromiseMethodP
artialOverloadMethodCallback, 0, v8::None, V8DOMConfiguration::kOnInterface, V8D
OMConfiguration::kDoNotCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOM
Configuration::kAllWorlds}, |
2800 {"partial2VoidMethod", V8TestInterface::partial2VoidMethodMethodCallback, 0,
v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V
8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}, | 2887 {"partial2VoidMethod", V8TestInterface::partial2VoidMethodMethodCallback, 0,
v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V
8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}, |
2801 {"partial2StaticVoidMethod", V8TestInterface::partial2StaticVoidMethodMethod
Callback, 0, v8::None, V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCh
eckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds
}, | 2888 {"partial2StaticVoidMethod", V8TestInterface::partial2StaticVoidMethodMethod
Callback, 0, v8::None, V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCh
eckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds
}, |
| 2889 {"keys", V8TestInterface::keysMethodCallback, 0, v8::None, V8DOMConfiguratio
n::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotChe
ckAccess, V8DOMConfiguration::kAllWorlds}, |
| 2890 {"values", V8TestInterface::valuesMethodCallback, 0, v8::None, V8DOMConfigur
ation::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNo
tCheckAccess, V8DOMConfiguration::kAllWorlds}, |
| 2891 {"entries", V8TestInterface::entriesMethodCallback, 0, v8::None, V8DOMConfig
uration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDo
NotCheckAccess, V8DOMConfiguration::kAllWorlds}, |
| 2892 {"forEach", V8TestInterface::forEachMethodCallback, 1, v8::None, V8DOMConfig
uration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDo
NotCheckAccess, V8DOMConfiguration::kAllWorlds}, |
2802 {"toJSON", V8TestInterface::toJSONMethodCallback, 0, static_cast<v8::Propert
yAttribute>(v8::DontEnum), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration:
:kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWo
rlds}, | 2893 {"toJSON", V8TestInterface::toJSONMethodCallback, 0, static_cast<v8::Propert
yAttribute>(v8::DontEnum), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration:
:kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWo
rlds}, |
2803 {"toString", V8TestInterface::toStringMethodCallback, 0, static_cast<v8::Pro
pertyAttribute>(v8::DontEnum), V8DOMConfiguration::kOnPrototype, V8DOMConfigurat
ion::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kA
llWorlds}, | 2894 {"toString", V8TestInterface::toStringMethodCallback, 0, static_cast<v8::Pro
pertyAttribute>(v8::DontEnum), V8DOMConfiguration::kOnPrototype, V8DOMConfigurat
ion::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kA
llWorlds}, |
2804 }; | 2895 }; |
2805 | 2896 |
2806 void V8TestInterface::installV8TestInterfaceTemplate(v8::Isolate* isolate, const
DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) { | 2897 void V8TestInterface::installV8TestInterfaceTemplate(v8::Isolate* isolate, const
DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) { |
2807 // Initialize the interface object's template. | 2898 // Initialize the interface object's template. |
2808 V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate,
V8TestInterface::wrapperTypeInfo.interface_name, V8TestInterfaceEmpty::domTempl
ate(isolate, world), V8TestInterface::internalFieldCount); | 2899 V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate,
V8TestInterface::wrapperTypeInfo.interface_name, V8TestInterfaceEmpty::domTempl
ate(isolate, world), V8TestInterface::internalFieldCount); |
2809 | 2900 |
2810 if (!RuntimeEnabledFeatures::featureNameEnabled()) { | 2901 if (!RuntimeEnabledFeatures::featureNameEnabled()) { |
2811 return; | 2902 return; |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3338 | 3429 |
3339 void V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(void (
*method)(const v8::FunctionCallbackInfo<v8::Value>&)) { | 3430 void V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(void (
*method)(const v8::FunctionCallbackInfo<v8::Value>&)) { |
3340 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInter
face = method; | 3431 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInter
face = method; |
3341 } | 3432 } |
3342 | 3433 |
3343 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(
void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) { | 3434 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(
void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) { |
3344 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPartia
lInterface = method; | 3435 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPartia
lInterface = method; |
3345 } | 3436 } |
3346 | 3437 |
3347 } // namespace blink | 3438 } // namespace blink |
OLD | NEW |