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

Side by Side Diff: Source/bindings/tests/results/core/TestInterfaceOrTestInterfaceEmpty.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 TestInterfaceOrTestInterfaceEmpty_h
8 #define TestInterfaceOrTestInterfaceEmpty_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/V8TestInterface.h"
14 #include "bindings/core/v8/V8TestInterfaceEmpty.h"
15 #include "bindings/tests/idls/core/TestImplements2.h"
16 #include "bindings/tests/idls/core/TestImplements3Implementation.h"
17 #include "bindings/tests/idls/core/TestPartialInterface.h"
18 #include "bindings/tests/idls/core/TestPartialInterfaceImplementation.h"
19 #include "platform/heap/Handle.h"
20
21 namespace blink {
22
23 class TestInterfaceOrTestInterfaceEmpty final {
24 ALLOW_ONLY_INLINE_ALLOCATION();
25 public:
26 TestInterfaceOrTestInterfaceEmpty();
27 bool isNull() const { return m_type == SpecificTypeNone; }
28
29 bool isTestInterface() const { return m_type == SpecificTypeTestInterface; }
30 PassRefPtr<TestInterfaceImplementation> getAsTestInterface() const;
31 void setTestInterface(PassRefPtr<TestInterfaceImplementation>);
32 static TestInterfaceOrTestInterfaceEmpty fromTestInterface(PassRefPtr<TestIn terfaceImplementation>);
33
34 bool isTestInterfaceEmpty() const { return m_type == SpecificTypeTestInterfa ceEmpty; }
35 PassRefPtr<TestInterfaceEmpty> getAsTestInterfaceEmpty() const;
36 void setTestInterfaceEmpty(PassRefPtr<TestInterfaceEmpty>);
37 static TestInterfaceOrTestInterfaceEmpty fromTestInterfaceEmpty(PassRefPtr<T estInterfaceEmpty>);
38
39 private:
40 enum SpecificTypes {
41 SpecificTypeNone,
42 SpecificTypeTestInterface,
43 SpecificTypeTestInterfaceEmpty,
44 };
45 SpecificTypes m_type;
46
47 RefPtr<TestInterfaceImplementation> m_testInterface;
48 RefPtr<TestInterfaceEmpty> m_testInterfaceEmpty;
49
50 friend v8::Local<v8::Value> toV8(const TestInterfaceOrTestInterfaceEmpty&, v 8::Local<v8::Object>, v8::Isolate*);
51 };
52
53 class V8TestInterfaceOrTestInterfaceEmpty final {
54 public:
55 static void toImpl(v8::Isolate*, v8::Local<v8::Value>, TestInterfaceOrTestIn terfaceEmpty&, ExceptionState&);
56 };
57
58 v8::Local<v8::Value> toV8(const TestInterfaceOrTestInterfaceEmpty&, v8::Local<v8 ::Object>, v8::Isolate*);
59
60 template <class CallbackInfo>
61 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceOrTe stInterfaceEmpty& impl)
62 {
63 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf o.GetIsolate()));
64 }
65
66 template <>
67 struct NativeValueTraits<TestInterfaceOrTestInterfaceEmpty> {
68 static TestInterfaceOrTestInterfaceEmpty nativeValue(const v8::Local<v8::Val ue>&, v8::Isolate*, ExceptionState&);
69 };
70
71 } // namespace blink
72
73 #endif // TestInterfaceOrTestInterfaceEmpty_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698