| 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 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 public: | 26 public: |
| 27 BooleanOrString(); | 27 BooleanOrString(); |
| 28 bool isNull() const { return m_type == SpecificTypeNone; } | 28 bool isNull() const { return m_type == SpecificTypeNone; } |
| 29 | 29 |
| 30 bool isBoolean() const { return m_type == SpecificTypeBoolean; } | 30 bool isBoolean() const { return m_type == SpecificTypeBoolean; } |
| 31 bool getAsBoolean() const; | 31 bool getAsBoolean() const; |
| 32 void setBoolean(bool); | 32 void setBoolean(bool); |
| 33 static BooleanOrString fromBoolean(bool); | 33 static BooleanOrString fromBoolean(bool); |
| 34 | 34 |
| 35 bool isString() const { return m_type == SpecificTypeString; } | 35 bool isString() const { return m_type == SpecificTypeString; } |
| 36 String getAsString() const; | 36 const String& getAsString() const; |
| 37 void setString(String); | 37 void setString(const String&); |
| 38 static BooleanOrString fromString(String); | 38 static BooleanOrString fromString(const String&); |
| 39 | 39 |
| 40 BooleanOrString(const BooleanOrString&); | 40 BooleanOrString(const BooleanOrString&); |
| 41 ~BooleanOrString(); | 41 ~BooleanOrString(); |
| 42 BooleanOrString& operator=(const BooleanOrString&); | 42 BooleanOrString& operator=(const BooleanOrString&); |
| 43 DECLARE_TRACE(); | 43 DECLARE_TRACE(); |
| 44 | 44 |
| 45 private: | 45 private: |
| 46 enum SpecificTypes { | 46 enum SpecificTypes { |
| 47 SpecificTypeNone, | 47 SpecificTypeNone, |
| 48 SpecificTypeBoolean, | 48 SpecificTypeBoolean, |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 | 85 |
| 86 } // namespace blink | 86 } // namespace blink |
| 87 | 87 |
| 88 // We need to set canInitializeWithMemset=true because HeapVector supports | 88 // We need to set canInitializeWithMemset=true because HeapVector supports |
| 89 // items that can initialize with memset or have a vtable. It is safe to | 89 // items that can initialize with memset or have a vtable. It is safe to |
| 90 // set canInitializeWithMemset=true for a union type object in practice. | 90 // set canInitializeWithMemset=true for a union type object in practice. |
| 91 // See https://codereview.chromium.org/1118993002/#msg5 for more details. | 91 // See https://codereview.chromium.org/1118993002/#msg5 for more details. |
| 92 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::BooleanOrString); | 92 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::BooleanOrString); |
| 93 | 93 |
| 94 #endif // BooleanOrString_h | 94 #endif // BooleanOrString_h |
| OLD | NEW |