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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6
7 #ifndef TestInterface2OrUint8Array_h
8 #define TestInterface2OrUint8Array_h
9
10 #include "bindings/core/v8/Dictionary.h"
11 #include "bindings/core/v8/ExceptionState.h"
12 #include "bindings/core/v8/V8Binding.h"
13 #include "bindings/core/v8/V8TestInterface2.h"
14 #include "bindings/core/v8/V8Uint8Array.h"
15 #include "platform/heap/Handle.h"
16
17 namespace blink {
18
19 class TestInterface2OrUint8Array final {
20 ALLOW_ONLY_INLINE_ALLOCATION();
21 public:
22 TestInterface2OrUint8Array();
23 bool isNull() const { return m_type == SpecificTypeNone; }
24
25 bool isTestInterface2() const { return m_type == SpecificTypeTestInterface2; }
26 PassRefPtr<TestInterface2> getAsTestInterface2() const;
27 void setTestInterface2(PassRefPtr<TestInterface2>);
28 static TestInterface2OrUint8Array fromTestInterface2(PassRefPtr<TestInterfac e2>);
29
30 bool isUint8Array() const { return m_type == SpecificTypeUint8Array; }
31 PassRefPtr<DOMUint8Array> getAsUint8Array() const;
32 void setUint8Array(PassRefPtr<DOMUint8Array>);
33 static TestInterface2OrUint8Array fromUint8Array(PassRefPtr<DOMUint8Array>);
34
35 private:
36 enum SpecificTypes {
37 SpecificTypeNone,
38 SpecificTypeTestInterface2,
39 SpecificTypeUint8Array,
40 };
41 SpecificTypes m_type;
42
43 RefPtr<TestInterface2> m_testInterface2;
44 RefPtr<DOMUint8Array> m_uint8Array;
45
46 friend v8::Local<v8::Value> toV8(const TestInterface2OrUint8Array&, v8::Loca l<v8::Object>, v8::Isolate*);
47 };
48
49 class V8TestInterface2OrUint8Array final {
50 public:
51 static void toImpl(v8::Isolate*, v8::Local<v8::Value>, TestInterface2OrUint8 Array&, ExceptionState&);
52 };
53
54 v8::Local<v8::Value> toV8(const TestInterface2OrUint8Array&, v8::Local<v8::Objec t>, v8::Isolate*);
55
56 template <class CallbackInfo>
57 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterface2OrU int8Array& impl)
58 {
59 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf o.GetIsolate()));
60 }
61
62 template <>
63 struct NativeValueTraits<TestInterface2OrUint8Array> {
64 static TestInterface2OrUint8Array nativeValue(const v8::Local<v8::Value>&, v 8::Isolate*, ExceptionState&);
65 };
66
67 } // namespace blink
68
69 #endif // TestInterface2OrUint8Array_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698