OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file has been auto-generated by code_generator_v8.py. | 5 // This file has been auto-generated by code_generator_v8.py. |
6 // DO NOT MODIFY! | 6 // DO NOT MODIFY! |
7 | 7 |
8 // This file has been generated from the Jinja2 template in | 8 // This file has been generated from the Jinja2 template in |
9 // third_party/WebKit/Source/bindings/templates/union_container.h.tmpl | 9 // third_party/WebKit/Source/bindings/templates/union_container.h.tmpl |
10 | 10 |
11 // clang-format off | 11 // clang-format off |
12 #ifndef StringOrArrayBufferOrArrayBufferView_h | 12 #ifndef StringOrArrayBufferOrArrayBufferView_h |
13 #define StringOrArrayBufferOrArrayBufferView_h | 13 #define StringOrArrayBufferOrArrayBufferView_h |
14 | 14 |
15 #include "bindings/core/v8/Dictionary.h" | 15 #include "bindings/core/v8/Dictionary.h" |
16 #include "bindings/core/v8/ExceptionState.h" | 16 #include "bindings/core/v8/ExceptionState.h" |
17 #include "bindings/core/v8/NativeValueTraits.h" | 17 #include "bindings/core/v8/NativeValueTraits.h" |
| 18 #include "bindings/core/v8/V8ArrayBufferView.h" |
18 #include "bindings/core/v8/V8Binding.h" | 19 #include "bindings/core/v8/V8Binding.h" |
19 #include "core/CoreExport.h" | 20 #include "core/CoreExport.h" |
| 21 #include "core/dom/FlexibleArrayBufferView.h" |
| 22 #include "core/dom/NotShared.h" |
20 #include "platform/heap/Handle.h" | 23 #include "platform/heap/Handle.h" |
21 | 24 |
22 namespace blink { | 25 namespace blink { |
23 | 26 |
24 class TestArrayBuffer; | 27 class TestArrayBuffer; |
25 class TestArrayBufferView; | |
26 | 28 |
27 class CORE_EXPORT StringOrArrayBufferOrArrayBufferView final { | 29 class CORE_EXPORT StringOrArrayBufferOrArrayBufferView final { |
28 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 30 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
29 public: | 31 public: |
30 StringOrArrayBufferOrArrayBufferView(); | 32 StringOrArrayBufferOrArrayBufferView(); |
31 bool isNull() const { return m_type == SpecificTypeNone; } | 33 bool isNull() const { return m_type == SpecificTypeNone; } |
32 | 34 |
33 bool isArrayBuffer() const { return m_type == SpecificTypeArrayBuffer; } | 35 bool isArrayBuffer() const { return m_type == SpecificTypeArrayBuffer; } |
34 TestArrayBuffer* getAsArrayBuffer() const; | 36 TestArrayBuffer* getAsArrayBuffer() const; |
35 void setArrayBuffer(TestArrayBuffer*); | 37 void setArrayBuffer(TestArrayBuffer*); |
36 static StringOrArrayBufferOrArrayBufferView fromArrayBuffer(TestArrayBuffer*); | 38 static StringOrArrayBufferOrArrayBufferView fromArrayBuffer(TestArrayBuffer*); |
37 | 39 |
38 bool isArrayBufferView() const { return m_type == SpecificTypeArrayBufferView;
} | 40 bool isArrayBufferView() const { return m_type == SpecificTypeArrayBufferView;
} |
39 TestArrayBufferView* getAsArrayBufferView() const; | 41 NotShared<TestArrayBufferView> getAsArrayBufferView() const; |
40 void setArrayBufferView(TestArrayBufferView*); | 42 void setArrayBufferView(NotShared<TestArrayBufferView>); |
41 static StringOrArrayBufferOrArrayBufferView fromArrayBufferView(TestArrayBuffe
rView*); | 43 static StringOrArrayBufferOrArrayBufferView fromArrayBufferView(NotShared<Test
ArrayBufferView>); |
42 | 44 |
43 bool isString() const { return m_type == SpecificTypeString; } | 45 bool isString() const { return m_type == SpecificTypeString; } |
44 String getAsString() const; | 46 String getAsString() const; |
45 void setString(String); | 47 void setString(String); |
46 static StringOrArrayBufferOrArrayBufferView fromString(String); | 48 static StringOrArrayBufferOrArrayBufferView fromString(String); |
47 | 49 |
48 StringOrArrayBufferOrArrayBufferView(const StringOrArrayBufferOrArrayBufferVie
w&); | 50 StringOrArrayBufferOrArrayBufferView(const StringOrArrayBufferOrArrayBufferVie
w&); |
49 ~StringOrArrayBufferOrArrayBufferView(); | 51 ~StringOrArrayBufferOrArrayBufferView(); |
50 StringOrArrayBufferOrArrayBufferView& operator=(const StringOrArrayBufferOrArr
ayBufferView&); | 52 StringOrArrayBufferOrArrayBufferView& operator=(const StringOrArrayBufferOrArr
ayBufferView&); |
51 DECLARE_TRACE(); | 53 DECLARE_TRACE(); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 97 |
96 } // namespace blink | 98 } // namespace blink |
97 | 99 |
98 // We need to set canInitializeWithMemset=true because HeapVector supports | 100 // We need to set canInitializeWithMemset=true because HeapVector supports |
99 // items that can initialize with memset or have a vtable. It is safe to | 101 // items that can initialize with memset or have a vtable. It is safe to |
100 // set canInitializeWithMemset=true for a union type object in practice. | 102 // set canInitializeWithMemset=true for a union type object in practice. |
101 // See https://codereview.chromium.org/1118993002/#msg5 for more details. | 103 // See https://codereview.chromium.org/1118993002/#msg5 for more details. |
102 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::StringOrArrayBufferOrArrayBuff
erView); | 104 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::StringOrArrayBufferOrArrayBuff
erView); |
103 | 105 |
104 #endif // StringOrArrayBufferOrArrayBufferView_h | 106 #endif // StringOrArrayBufferOrArrayBufferView_h |
OLD | NEW |