| 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 59d2429fc17a4c01e825a79b8b12ba0dda17c87c..0e9e5775e2eb2809431524d95c90815aa735c737 100644
|
| --- a/Source/bindings/tests/results/core/UnionTypesCore.h
|
| +++ b/Source/bindings/tests/results/core/UnionTypesCore.h
|
| @@ -7,32 +7,229 @@
|
| #ifndef UnionTypeCore_h
|
| #define UnionTypeCore_h
|
|
|
| +#include "bindings/core/v8/ExceptionState.h"
|
| +#include "bindings/core/v8/V8Binding.h"
|
| +#include "platform/heap/Handle.h"
|
| +
|
| namespace blink {
|
|
|
| +class Node;
|
| +class NodeList;
|
| +class TestDictionary;
|
| +class TestInterface;
|
| +class TestInterfaceEmpty;
|
| +class TestInterfaceGarbageCollected;
|
| +class TestInterfaceWillBeGarbageCollected;
|
| +
|
| class LongSequenceOrStringArrayOrUnrestrictedDouble final {
|
| - // FIXME: Implement
|
| + ALLOW_ONLY_INLINE_ALLOCATION();
|
| +public:
|
| + LongSequenceOrStringArrayOrUnrestrictedDouble();
|
| + bool isNull() const { return m_specificTypeFlag == 0; }
|
| +
|
| + bool isLongSequence() const { return m_specificTypeFlag == 1; }
|
| + const Vector<int>& getAsLongSequence();
|
| + void setLongSequence(const Vector<int>&);
|
| +
|
| + bool isStringArray() const { return m_specificTypeFlag == 2; }
|
| + const Vector<String>& getAsStringArray();
|
| + void setStringArray(const Vector<String>&);
|
| +
|
| + bool isUnrestrictedDouble() const { return m_specificTypeFlag == 3; }
|
| + double getAsUnrestrictedDouble();
|
| + void setUnrestrictedDouble(double);
|
| +
|
| +private:
|
| + unsigned m_specificTypeFlag;
|
| +
|
| + Vector<int> m_longSequence;
|
| + Vector<String> m_stringArray;
|
| + double m_unrestrictedDouble;
|
| };
|
|
|
| +class V8LongSequenceOrStringArrayOrUnrestrictedDouble {
|
| +public:
|
| + static void toImpl(v8::Isolate*, v8::Handle<v8::Value>, LongSequenceOrStringArrayOrUnrestrictedDouble&, ExceptionState&);
|
| +};
|
| +
|
| +v8::Handle<v8::Value> toV8(LongSequenceOrStringArrayOrUnrestrictedDouble&, v8::Handle<v8::Object>, v8::Isolate*);
|
| +
|
| +template <class CallbackInfo>
|
| +inline void v8SetReturnValue(const CallbackInfo& callbackInfo, LongSequenceOrStringArrayOrUnrestrictedDouble& impl)
|
| +{
|
| + v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
|
| +}
|
| +
|
| class NodeOrNodeList final {
|
| - // FIXME: Implement
|
| + ALLOW_ONLY_INLINE_ALLOCATION();
|
| +public:
|
| + NodeOrNodeList();
|
| + bool isNull() const { return m_specificTypeFlag == 0; }
|
| +
|
| + bool isNode() const { return m_specificTypeFlag == 1; }
|
| + PassRefPtr<Node> getAsNode();
|
| + void setNode(PassRefPtr<Node>);
|
| +
|
| + bool isNodeList() const { return m_specificTypeFlag == 2; }
|
| + PassRefPtr<NodeList> getAsNodeList();
|
| + void setNodeList(PassRefPtr<NodeList>);
|
| +
|
| +private:
|
| + unsigned m_specificTypeFlag;
|
| +
|
| + RefPtr<Node> m_node;
|
| + RefPtr<NodeList> m_nodeList;
|
| +};
|
| +
|
| +class V8NodeOrNodeList {
|
| +public:
|
| + static void toImpl(v8::Isolate*, v8::Handle<v8::Value>, NodeOrNodeList&, ExceptionState&);
|
| };
|
|
|
| +v8::Handle<v8::Value> toV8(NodeOrNodeList&, v8::Handle<v8::Object>, v8::Isolate*);
|
| +
|
| +template <class CallbackInfo>
|
| +inline void v8SetReturnValue(const CallbackInfo& callbackInfo, NodeOrNodeList& impl)
|
| +{
|
| + v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
|
| +}
|
| +
|
| class StringOrDouble final {
|
| - // FIXME: Implement
|
| + ALLOW_ONLY_INLINE_ALLOCATION();
|
| +public:
|
| + StringOrDouble();
|
| + bool isNull() const { return m_specificTypeFlag == 0; }
|
| +
|
| + bool isString() const { return m_specificTypeFlag == 1; }
|
| + String getAsString();
|
| + void setString(String);
|
| +
|
| + bool isDouble() const { return m_specificTypeFlag == 2; }
|
| + double getAsDouble();
|
| + void setDouble(double);
|
| +
|
| +private:
|
| + unsigned m_specificTypeFlag;
|
| +
|
| + String m_string;
|
| + double m_double;
|
| };
|
|
|
| +class V8StringOrDouble {
|
| +public:
|
| + static void toImpl(v8::Isolate*, v8::Handle<v8::Value>, StringOrDouble&, ExceptionState&);
|
| +};
|
| +
|
| +v8::Handle<v8::Value> toV8(StringOrDouble&, v8::Handle<v8::Object>, v8::Isolate*);
|
| +
|
| +template <class CallbackInfo>
|
| +inline void v8SetReturnValue(const CallbackInfo& callbackInfo, StringOrDouble& impl)
|
| +{
|
| + v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
|
| +}
|
| +
|
| class TestInterfaceGarbageCollectedOrString final {
|
| - // FIXME: Implement
|
| + ALLOW_ONLY_INLINE_ALLOCATION();
|
| +public:
|
| + TestInterfaceGarbageCollectedOrString();
|
| + bool isNull() const { return m_specificTypeFlag == 0; }
|
| +
|
| + bool isTestInterfaceGarbageCollected() const { return m_specificTypeFlag == 1; }
|
| + PassRefPtr<TestInterfaceGarbageCollected> getAsTestInterfaceGarbageCollected();
|
| + void setTestInterfaceGarbageCollected(PassRefPtr<TestInterfaceGarbageCollected>);
|
| +
|
| + bool isString() const { return m_specificTypeFlag == 2; }
|
| + String getAsString();
|
| + void setString(String);
|
| +
|
| +private:
|
| + unsigned m_specificTypeFlag;
|
| +
|
| + RefPtr<TestInterfaceGarbageCollected> m_testInterfaceGarbageCollected;
|
| + String m_string;
|
| +};
|
| +
|
| +class V8TestInterfaceGarbageCollectedOrString {
|
| +public:
|
| + static void toImpl(v8::Isolate*, v8::Handle<v8::Value>, TestInterfaceGarbageCollectedOrString&, ExceptionState&);
|
| };
|
|
|
| +v8::Handle<v8::Value> toV8(TestInterfaceGarbageCollectedOrString&, v8::Handle<v8::Object>, v8::Isolate*);
|
| +
|
| +template <class CallbackInfo>
|
| +inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceGarbageCollectedOrString& impl)
|
| +{
|
| + v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
|
| +}
|
| +
|
| class TestInterfaceOrTestInterfaceEmpty final {
|
| - // FIXME: Implement
|
| + ALLOW_ONLY_INLINE_ALLOCATION();
|
| +public:
|
| + TestInterfaceOrTestInterfaceEmpty();
|
| + bool isNull() const { return m_specificTypeFlag == 0; }
|
| +
|
| + bool isTestInterface() const { return m_specificTypeFlag == 1; }
|
| + PassRefPtr<TestInterface> getAsTestInterface();
|
| + void setTestInterface(PassRefPtr<TestInterface>);
|
| +
|
| + bool isTestInterfaceEmpty() const { return m_specificTypeFlag == 2; }
|
| + PassRefPtr<TestInterfaceEmpty> getAsTestInterfaceEmpty();
|
| + void setTestInterfaceEmpty(PassRefPtr<TestInterfaceEmpty>);
|
| +
|
| +private:
|
| + unsigned m_specificTypeFlag;
|
| +
|
| + RefPtr<TestInterface> m_testInterface;
|
| + RefPtr<TestInterfaceEmpty> m_testInterfaceEmpty;
|
| };
|
|
|
| +class V8TestInterfaceOrTestInterfaceEmpty {
|
| +public:
|
| + static void toImpl(v8::Isolate*, v8::Handle<v8::Value>, TestInterfaceOrTestInterfaceEmpty&, ExceptionState&);
|
| +};
|
| +
|
| +v8::Handle<v8::Value> toV8(TestInterfaceOrTestInterfaceEmpty&, v8::Handle<v8::Object>, v8::Isolate*);
|
| +
|
| +template <class CallbackInfo>
|
| +inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceOrTestInterfaceEmpty& impl)
|
| +{
|
| + v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
|
| +}
|
| +
|
| class TestInterfaceWillBeGarbageCollectedOrTestDictionary final {
|
| - // FIXME: Implement
|
| + ALLOW_ONLY_INLINE_ALLOCATION();
|
| +public:
|
| + TestInterfaceWillBeGarbageCollectedOrTestDictionary();
|
| + bool isNull() const { return m_specificTypeFlag == 0; }
|
| +
|
| + bool isTestInterfaceWillBeGarbageCollected() const { return m_specificTypeFlag == 1; }
|
| + PassRefPtr<TestInterfaceWillBeGarbageCollected> getAsTestInterfaceWillBeGarbageCollected();
|
| + void setTestInterfaceWillBeGarbageCollected(PassRefPtr<TestInterfaceWillBeGarbageCollected>);
|
| +
|
| + bool isTestDictionary() const { return m_specificTypeFlag == 2; }
|
| + PassRefPtr<TestDictionary> getAsTestDictionary();
|
| + void setTestDictionary(PassRefPtr<TestDictionary>);
|
| +
|
| +private:
|
| + unsigned m_specificTypeFlag;
|
| +
|
| + RefPtr<TestInterfaceWillBeGarbageCollected> m_testInterfaceWillBeGarbageCollected;
|
| + RefPtr<TestDictionary> m_testDictionary;
|
| +};
|
| +
|
| +class V8TestInterfaceWillBeGarbageCollectedOrTestDictionary {
|
| +public:
|
| + static void toImpl(v8::Isolate*, v8::Handle<v8::Value>, TestInterfaceWillBeGarbageCollectedOrTestDictionary&, ExceptionState&);
|
| };
|
|
|
| +v8::Handle<v8::Value> toV8(TestInterfaceWillBeGarbageCollectedOrTestDictionary&, v8::Handle<v8::Object>, v8::Isolate*);
|
| +
|
| +template <class CallbackInfo>
|
| +inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceWillBeGarbageCollectedOrTestDictionary& impl)
|
| +{
|
| + v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
|
| +}
|
| +
|
| } // namespace blink
|
|
|
| #endif // UnionTypeCore_h
|
|
|