| Index: third_party/WebKit/Source/bindings/tests/results/core/UnsignedLongLongOrBooleanOrTestCallbackInterface.h
|
| diff --git a/third_party/WebKit/Source/bindings/tests/results/core/UnsignedLongLongOrBooleanOrTestCallbackInterface.h b/third_party/WebKit/Source/bindings/tests/results/core/UnsignedLongLongOrBooleanOrTestCallbackInterface.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..8399452273fe5a705ec3b324196b375015572334
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/bindings/tests/results/core/UnsignedLongLongOrBooleanOrTestCallbackInterface.h
|
| @@ -0,0 +1,103 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +// This file has been auto-generated by code_generator_v8.py.
|
| +// DO NOT MODIFY!
|
| +
|
| +// This file has been generated from the Jinja2 template in
|
| +// third_party/WebKit/Source/bindings/templates/union_container.h.tmpl
|
| +
|
| +// clang-format off
|
| +#ifndef UnsignedLongLongOrBooleanOrTestCallbackInterface_h
|
| +#define UnsignedLongLongOrBooleanOrTestCallbackInterface_h
|
| +
|
| +#include "bindings/core/v8/Dictionary.h"
|
| +#include "bindings/core/v8/ExceptionState.h"
|
| +#include "bindings/core/v8/NativeValueTraits.h"
|
| +#include "bindings/core/v8/V8Binding.h"
|
| +#include "core/CoreExport.h"
|
| +#include "platform/heap/Handle.h"
|
| +
|
| +namespace blink {
|
| +
|
| +class TestCallbackInterface;
|
| +
|
| +class CORE_EXPORT UnsignedLongLongOrBooleanOrTestCallbackInterface final {
|
| + DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
|
| + public:
|
| + UnsignedLongLongOrBooleanOrTestCallbackInterface();
|
| + bool isNull() const { return m_type == SpecificTypeNone; }
|
| +
|
| + bool isBoolean() const { return m_type == SpecificTypeBoolean; }
|
| + bool getAsBoolean() const;
|
| + void setBoolean(bool);
|
| + static UnsignedLongLongOrBooleanOrTestCallbackInterface fromBoolean(bool);
|
| +
|
| + bool isTestCallbackInterface() const { return m_type == SpecificTypeTestCallbackInterface; }
|
| + TestCallbackInterface* getAsTestCallbackInterface() const;
|
| + void setTestCallbackInterface(TestCallbackInterface*);
|
| + static UnsignedLongLongOrBooleanOrTestCallbackInterface fromTestCallbackInterface(TestCallbackInterface*);
|
| +
|
| + bool isUnsignedLongLong() const { return m_type == SpecificTypeUnsignedLongLong; }
|
| + uint64_t getAsUnsignedLongLong() const;
|
| + void setUnsignedLongLong(uint64_t);
|
| + static UnsignedLongLongOrBooleanOrTestCallbackInterface fromUnsignedLongLong(uint64_t);
|
| +
|
| + UnsignedLongLongOrBooleanOrTestCallbackInterface(const UnsignedLongLongOrBooleanOrTestCallbackInterface&);
|
| + ~UnsignedLongLongOrBooleanOrTestCallbackInterface();
|
| + UnsignedLongLongOrBooleanOrTestCallbackInterface& operator=(const UnsignedLongLongOrBooleanOrTestCallbackInterface&);
|
| + DECLARE_TRACE();
|
| +
|
| + private:
|
| + enum SpecificTypes {
|
| + SpecificTypeNone,
|
| + SpecificTypeBoolean,
|
| + SpecificTypeTestCallbackInterface,
|
| + SpecificTypeUnsignedLongLong,
|
| + };
|
| + SpecificTypes m_type;
|
| +
|
| + bool m_boolean;
|
| + Member<TestCallbackInterface> m_testCallbackInterface;
|
| + uint64_t m_unsignedLongLong;
|
| +
|
| + friend CORE_EXPORT v8::Local<v8::Value> ToV8(const UnsignedLongLongOrBooleanOrTestCallbackInterface&, v8::Local<v8::Object>, v8::Isolate*);
|
| +};
|
| +
|
| +class V8UnsignedLongLongOrBooleanOrTestCallbackInterface final {
|
| + public:
|
| + CORE_EXPORT static void toImpl(v8::Isolate*, v8::Local<v8::Value>, UnsignedLongLongOrBooleanOrTestCallbackInterface&, UnionTypeConversionMode, ExceptionState&);
|
| +};
|
| +
|
| +CORE_EXPORT v8::Local<v8::Value> ToV8(const UnsignedLongLongOrBooleanOrTestCallbackInterface&, v8::Local<v8::Object>, v8::Isolate*);
|
| +
|
| +template <class CallbackInfo>
|
| +inline void v8SetReturnValue(const CallbackInfo& callbackInfo, UnsignedLongLongOrBooleanOrTestCallbackInterface& impl) {
|
| + v8SetReturnValue(callbackInfo, ToV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
|
| +}
|
| +
|
| +template <class CallbackInfo>
|
| +inline void v8SetReturnValue(const CallbackInfo& callbackInfo, UnsignedLongLongOrBooleanOrTestCallbackInterface& impl, v8::Local<v8::Object> creationContext) {
|
| + v8SetReturnValue(callbackInfo, ToV8(impl, creationContext, callbackInfo.GetIsolate()));
|
| +}
|
| +
|
| +template <>
|
| +struct NativeValueTraits<UnsignedLongLongOrBooleanOrTestCallbackInterface> : public NativeValueTraitsBase<UnsignedLongLongOrBooleanOrTestCallbackInterface> {
|
| + CORE_EXPORT static UnsignedLongLongOrBooleanOrTestCallbackInterface nativeValue(v8::Isolate*, v8::Local<v8::Value>, ExceptionState&);
|
| +};
|
| +
|
| +template <>
|
| +struct V8TypeOf<UnsignedLongLongOrBooleanOrTestCallbackInterface> {
|
| + typedef V8UnsignedLongLongOrBooleanOrTestCallbackInterface Type;
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +// We need to set canInitializeWithMemset=true because HeapVector supports
|
| +// items that can initialize with memset or have a vtable. It is safe to
|
| +// set canInitializeWithMemset=true for a union type object in practice.
|
| +// See https://codereview.chromium.org/1118993002/#msg5 for more details.
|
| +WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::UnsignedLongLongOrBooleanOrTestCallbackInterface);
|
| +
|
| +#endif // UnsignedLongLongOrBooleanOrTestCallbackInterface_h
|
|
|