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

Unified Diff: Source/bindings/tests/results/core/UnionTypesCore.h

Issue 700733003: IDL: Support union type arrays and sequences for method arguments (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/templates/union.cpp ('k') | Source/bindings/tests/results/core/UnionTypesCore.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/tests/results/core/UnionTypesCore.h
diff --git a/Source/bindings/tests/results/core/UnionTypesCore.h b/Source/bindings/tests/results/core/UnionTypesCore.h
index abe6fda1ec56786224046ac2d7dc8771b40e6b28..d729ac39165e71650040750f2773c745883bf09b 100644
--- a/Source/bindings/tests/results/core/UnionTypesCore.h
+++ b/Source/bindings/tests/results/core/UnionTypesCore.h
@@ -70,6 +70,11 @@ inline void v8SetReturnValue(const CallbackInfo& callbackInfo, BooleanOrStringOr
v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
}
+template <>
+struct NativeValueTraits<BooleanOrStringOrUnrestrictedDouble> {
+ static BooleanOrStringOrUnrestrictedDouble nativeValue(const v8::Handle<v8::Value>&, v8::Isolate*, ExceptionState&);
+};
+
class DoubleOrString final {
ALLOW_ONLY_INLINE_ALLOCATION();
public:
@@ -111,6 +116,11 @@ inline void v8SetReturnValue(const CallbackInfo& callbackInfo, DoubleOrString& i
v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
}
+template <>
+struct NativeValueTraits<DoubleOrString> {
+ static DoubleOrString nativeValue(const v8::Handle<v8::Value>&, v8::Isolate*, ExceptionState&);
+};
+
class NodeOrNodeList final {
ALLOW_ONLY_INLINE_ALLOCATION();
public:
@@ -154,6 +164,11 @@ inline void v8SetReturnValue(const CallbackInfo& callbackInfo, NodeOrNodeList& i
v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
}
+template <>
+struct NativeValueTraits<NodeOrNodeList> {
+ static NodeOrNodeList nativeValue(const v8::Handle<v8::Value>&, v8::Isolate*, ExceptionState&);
+};
+
class StringOrArrayBufferOrArrayBufferView final {
ALLOW_ONLY_INLINE_ALLOCATION();
public:
@@ -201,6 +216,11 @@ inline void v8SetReturnValue(const CallbackInfo& callbackInfo, StringOrArrayBuff
v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
}
+template <>
+struct NativeValueTraits<StringOrArrayBufferOrArrayBufferView> {
+ static StringOrArrayBufferOrArrayBufferView nativeValue(const v8::Handle<v8::Value>&, v8::Isolate*, ExceptionState&);
+};
+
class StringOrDouble final {
ALLOW_ONLY_INLINE_ALLOCATION();
public:
@@ -242,6 +262,11 @@ inline void v8SetReturnValue(const CallbackInfo& callbackInfo, StringOrDouble& i
v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
}
+template <>
+struct NativeValueTraits<StringOrDouble> {
+ static StringOrDouble nativeValue(const v8::Handle<v8::Value>&, v8::Isolate*, ExceptionState&);
+};
+
class TestInterfaceGarbageCollectedOrString final {
ALLOW_ONLY_INLINE_ALLOCATION();
public:
@@ -285,6 +310,11 @@ inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceGarb
v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
}
+template <>
+struct NativeValueTraits<TestInterfaceGarbageCollectedOrString> {
+ static TestInterfaceGarbageCollectedOrString nativeValue(const v8::Handle<v8::Value>&, v8::Isolate*, ExceptionState&);
+};
+
class TestInterfaceOrLong final {
ALLOW_ONLY_INLINE_ALLOCATION();
public:
@@ -326,6 +356,11 @@ inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceOrLo
v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
}
+template <>
+struct NativeValueTraits<TestInterfaceOrLong> {
+ static TestInterfaceOrLong nativeValue(const v8::Handle<v8::Value>&, v8::Isolate*, ExceptionState&);
+};
+
class TestInterfaceOrTestInterfaceEmpty final {
ALLOW_ONLY_INLINE_ALLOCATION();
public:
@@ -367,6 +402,11 @@ inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceOrTe
v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
}
+template <>
+struct NativeValueTraits<TestInterfaceOrTestInterfaceEmpty> {
+ static TestInterfaceOrTestInterfaceEmpty nativeValue(const v8::Handle<v8::Value>&, v8::Isolate*, ExceptionState&);
+};
+
class TestInterfaceWillBeGarbageCollectedOrTestDictionary final {
ALLOW_ONLY_INLINE_ALLOCATION();
public:
@@ -410,6 +450,11 @@ inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceWill
v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
}
+template <>
+struct NativeValueTraits<TestInterfaceWillBeGarbageCollectedOrTestDictionary> {
+ static TestInterfaceWillBeGarbageCollectedOrTestDictionary nativeValue(const v8::Handle<v8::Value>&, v8::Isolate*, ExceptionState&);
+};
+
class V8DoubleOrStringOrNull final {
public:
static void toImpl(v8::Isolate* isolate, v8::Handle<v8::Value> v8Value, DoubleOrString& impl, ExceptionState& exceptionState)
« no previous file with comments | « Source/bindings/templates/union.cpp ('k') | Source/bindings/tests/results/core/UnionTypesCore.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698