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

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

Issue 953123003: IDL: Put generated union type containers in separate files (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 months 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
Index: Source/bindings/tests/results/core/TestInterface2OrUint8Array.h
diff --git a/Source/bindings/tests/results/core/TestInterface2OrUint8Array.h b/Source/bindings/tests/results/core/TestInterface2OrUint8Array.h
new file mode 100644
index 0000000000000000000000000000000000000000..bed6ab73675e01ee5d8d12ddc34df4ab49c1575d
--- /dev/null
+++ b/Source/bindings/tests/results/core/TestInterface2OrUint8Array.h
@@ -0,0 +1,69 @@
+// Copyright 2015 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!
+
+#ifndef TestInterface2OrUint8Array_h
+#define TestInterface2OrUint8Array_h
+
+#include "bindings/core/v8/Dictionary.h"
+#include "bindings/core/v8/ExceptionState.h"
+#include "bindings/core/v8/V8Binding.h"
+#include "bindings/core/v8/V8TestInterface2.h"
+#include "bindings/core/v8/V8Uint8Array.h"
+#include "platform/heap/Handle.h"
+
+namespace blink {
+
+class TestInterface2OrUint8Array final {
+ ALLOW_ONLY_INLINE_ALLOCATION();
+public:
+ TestInterface2OrUint8Array();
+ bool isNull() const { return m_type == SpecificTypeNone; }
+
+ bool isTestInterface2() const { return m_type == SpecificTypeTestInterface2; }
+ PassRefPtr<TestInterface2> getAsTestInterface2() const;
+ void setTestInterface2(PassRefPtr<TestInterface2>);
+ static TestInterface2OrUint8Array fromTestInterface2(PassRefPtr<TestInterface2>);
+
+ bool isUint8Array() const { return m_type == SpecificTypeUint8Array; }
+ PassRefPtr<DOMUint8Array> getAsUint8Array() const;
+ void setUint8Array(PassRefPtr<DOMUint8Array>);
+ static TestInterface2OrUint8Array fromUint8Array(PassRefPtr<DOMUint8Array>);
+
+private:
+ enum SpecificTypes {
+ SpecificTypeNone,
+ SpecificTypeTestInterface2,
+ SpecificTypeUint8Array,
+ };
+ SpecificTypes m_type;
+
+ RefPtr<TestInterface2> m_testInterface2;
+ RefPtr<DOMUint8Array> m_uint8Array;
+
+ friend v8::Local<v8::Value> toV8(const TestInterface2OrUint8Array&, v8::Local<v8::Object>, v8::Isolate*);
+};
+
+class V8TestInterface2OrUint8Array final {
+public:
+ static void toImpl(v8::Isolate*, v8::Local<v8::Value>, TestInterface2OrUint8Array&, ExceptionState&);
+};
+
+v8::Local<v8::Value> toV8(const TestInterface2OrUint8Array&, v8::Local<v8::Object>, v8::Isolate*);
+
+template <class CallbackInfo>
+inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterface2OrUint8Array& impl)
+{
+ v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
+}
+
+template <>
+struct NativeValueTraits<TestInterface2OrUint8Array> {
+ static TestInterface2OrUint8Array nativeValue(const v8::Local<v8::Value>&, v8::Isolate*, ExceptionState&);
+};
+
+} // namespace blink
+
+#endif // TestInterface2OrUint8Array_h

Powered by Google App Engine
This is Rietveld 408576698