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

Side by Side Diff: Source/bindings/tests/results/core/UnionTypesCore.h

Issue 937773002: IDL: Support default values for dictionary members of union types (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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
OLDNEW
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. DO NOT MODIFY! 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6 6
7 #ifndef UnionTypeCore_h 7 #ifndef UnionTypeCore_h
8 #define UnionTypeCore_h 8 #define UnionTypeCore_h
9 9
10 #include "bindings/core/v8/Dictionary.h" 10 #include "bindings/core/v8/Dictionary.h"
(...skipping 17 matching lines...) Expand all
28 28
29 class ArrayBufferOrArrayBufferViewOrDictionary final { 29 class ArrayBufferOrArrayBufferViewOrDictionary final {
30 ALLOW_ONLY_INLINE_ALLOCATION(); 30 ALLOW_ONLY_INLINE_ALLOCATION();
31 public: 31 public:
32 ArrayBufferOrArrayBufferViewOrDictionary(); 32 ArrayBufferOrArrayBufferViewOrDictionary();
33 bool isNull() const { return m_type == SpecificTypeNone; } 33 bool isNull() const { return m_type == SpecificTypeNone; }
34 34
35 bool isArrayBuffer() const { return m_type == SpecificTypeArrayBuffer; } 35 bool isArrayBuffer() const { return m_type == SpecificTypeArrayBuffer; }
36 PassRefPtr<TestArrayBuffer> getAsArrayBuffer() const; 36 PassRefPtr<TestArrayBuffer> getAsArrayBuffer() const;
37 void setArrayBuffer(PassRefPtr<TestArrayBuffer>); 37 void setArrayBuffer(PassRefPtr<TestArrayBuffer>);
38 static ArrayBufferOrArrayBufferViewOrDictionary fromArrayBuffer(PassRefPtr<T estArrayBuffer>);
38 39
39 bool isArrayBufferView() const { return m_type == SpecificTypeArrayBufferVie w; } 40 bool isArrayBufferView() const { return m_type == SpecificTypeArrayBufferVie w; }
40 PassRefPtr<TestArrayBufferView> getAsArrayBufferView() const; 41 PassRefPtr<TestArrayBufferView> getAsArrayBufferView() const;
41 void setArrayBufferView(PassRefPtr<TestArrayBufferView>); 42 void setArrayBufferView(PassRefPtr<TestArrayBufferView>);
43 static ArrayBufferOrArrayBufferViewOrDictionary fromArrayBufferView(PassRefP tr<TestArrayBufferView>);
42 44
43 bool isDictionary() const { return m_type == SpecificTypeDictionary; } 45 bool isDictionary() const { return m_type == SpecificTypeDictionary; }
44 Dictionary getAsDictionary() const; 46 Dictionary getAsDictionary() const;
45 void setDictionary(Dictionary); 47 void setDictionary(Dictionary);
48 static ArrayBufferOrArrayBufferViewOrDictionary fromDictionary(Dictionary);
46 49
47 private: 50 private:
48 enum SpecificTypes { 51 enum SpecificTypes {
49 SpecificTypeNone, 52 SpecificTypeNone,
50 SpecificTypeArrayBuffer, 53 SpecificTypeArrayBuffer,
51 SpecificTypeArrayBufferView, 54 SpecificTypeArrayBufferView,
52 SpecificTypeDictionary, 55 SpecificTypeDictionary,
53 }; 56 };
54 SpecificTypes m_type; 57 SpecificTypes m_type;
55 58
(...skipping 24 matching lines...) Expand all
80 83
81 class BooleanOrStringOrUnrestrictedDouble final { 84 class BooleanOrStringOrUnrestrictedDouble final {
82 ALLOW_ONLY_INLINE_ALLOCATION(); 85 ALLOW_ONLY_INLINE_ALLOCATION();
83 public: 86 public:
84 BooleanOrStringOrUnrestrictedDouble(); 87 BooleanOrStringOrUnrestrictedDouble();
85 bool isNull() const { return m_type == SpecificTypeNone; } 88 bool isNull() const { return m_type == SpecificTypeNone; }
86 89
87 bool isBoolean() const { return m_type == SpecificTypeBoolean; } 90 bool isBoolean() const { return m_type == SpecificTypeBoolean; }
88 bool getAsBoolean() const; 91 bool getAsBoolean() const;
89 void setBoolean(bool); 92 void setBoolean(bool);
93 static BooleanOrStringOrUnrestrictedDouble fromBoolean(bool);
90 94
91 bool isString() const { return m_type == SpecificTypeString; } 95 bool isString() const { return m_type == SpecificTypeString; }
92 String getAsString() const; 96 String getAsString() const;
93 void setString(String); 97 void setString(String);
98 static BooleanOrStringOrUnrestrictedDouble fromString(String);
94 99
95 bool isUnrestrictedDouble() const { return m_type == SpecificTypeUnrestricte dDouble; } 100 bool isUnrestrictedDouble() const { return m_type == SpecificTypeUnrestricte dDouble; }
96 double getAsUnrestrictedDouble() const; 101 double getAsUnrestrictedDouble() const;
97 void setUnrestrictedDouble(double); 102 void setUnrestrictedDouble(double);
103 static BooleanOrStringOrUnrestrictedDouble fromUnrestrictedDouble(double);
98 104
99 private: 105 private:
100 enum SpecificTypes { 106 enum SpecificTypes {
101 SpecificTypeNone, 107 SpecificTypeNone,
102 SpecificTypeBoolean, 108 SpecificTypeBoolean,
103 SpecificTypeString, 109 SpecificTypeString,
104 SpecificTypeUnrestrictedDouble, 110 SpecificTypeUnrestrictedDouble,
105 }; 111 };
106 SpecificTypes m_type; 112 SpecificTypes m_type;
107 113
(...skipping 24 matching lines...) Expand all
132 138
133 class DoubleOrString final { 139 class DoubleOrString final {
134 ALLOW_ONLY_INLINE_ALLOCATION(); 140 ALLOW_ONLY_INLINE_ALLOCATION();
135 public: 141 public:
136 DoubleOrString(); 142 DoubleOrString();
137 bool isNull() const { return m_type == SpecificTypeNone; } 143 bool isNull() const { return m_type == SpecificTypeNone; }
138 144
139 bool isDouble() const { return m_type == SpecificTypeDouble; } 145 bool isDouble() const { return m_type == SpecificTypeDouble; }
140 double getAsDouble() const; 146 double getAsDouble() const;
141 void setDouble(double); 147 void setDouble(double);
148 static DoubleOrString fromDouble(double);
142 149
143 bool isString() const { return m_type == SpecificTypeString; } 150 bool isString() const { return m_type == SpecificTypeString; }
144 String getAsString() const; 151 String getAsString() const;
145 void setString(String); 152 void setString(String);
153 static DoubleOrString fromString(String);
146 154
147 private: 155 private:
148 enum SpecificTypes { 156 enum SpecificTypes {
149 SpecificTypeNone, 157 SpecificTypeNone,
150 SpecificTypeDouble, 158 SpecificTypeDouble,
151 SpecificTypeString, 159 SpecificTypeString,
152 }; 160 };
153 SpecificTypes m_type; 161 SpecificTypes m_type;
154 162
155 double m_double; 163 double m_double;
(...skipping 22 matching lines...) Expand all
178 186
179 class NodeOrNodeList final { 187 class NodeOrNodeList final {
180 ALLOW_ONLY_INLINE_ALLOCATION(); 188 ALLOW_ONLY_INLINE_ALLOCATION();
181 public: 189 public:
182 NodeOrNodeList(); 190 NodeOrNodeList();
183 bool isNull() const { return m_type == SpecificTypeNone; } 191 bool isNull() const { return m_type == SpecificTypeNone; }
184 192
185 bool isNode() const { return m_type == SpecificTypeNode; } 193 bool isNode() const { return m_type == SpecificTypeNode; }
186 PassRefPtrWillBeRawPtr<Node> getAsNode() const; 194 PassRefPtrWillBeRawPtr<Node> getAsNode() const;
187 void setNode(PassRefPtrWillBeRawPtr<Node>); 195 void setNode(PassRefPtrWillBeRawPtr<Node>);
196 static NodeOrNodeList fromNode(PassRefPtrWillBeRawPtr<Node>);
188 197
189 bool isNodeList() const { return m_type == SpecificTypeNodeList; } 198 bool isNodeList() const { return m_type == SpecificTypeNodeList; }
190 PassRefPtrWillBeRawPtr<NodeList> getAsNodeList() const; 199 PassRefPtrWillBeRawPtr<NodeList> getAsNodeList() const;
191 void setNodeList(PassRefPtrWillBeRawPtr<NodeList>); 200 void setNodeList(PassRefPtrWillBeRawPtr<NodeList>);
201 static NodeOrNodeList fromNodeList(PassRefPtrWillBeRawPtr<NodeList>);
192 202
193 void trace(Visitor*); 203 void trace(Visitor*);
194 204
195 private: 205 private:
196 enum SpecificTypes { 206 enum SpecificTypes {
197 SpecificTypeNone, 207 SpecificTypeNone,
198 SpecificTypeNode, 208 SpecificTypeNode,
199 SpecificTypeNodeList, 209 SpecificTypeNodeList,
200 }; 210 };
201 SpecificTypes m_type; 211 SpecificTypes m_type;
(...skipping 24 matching lines...) Expand all
226 236
227 class StringOrArrayBufferOrArrayBufferView final { 237 class StringOrArrayBufferOrArrayBufferView final {
228 ALLOW_ONLY_INLINE_ALLOCATION(); 238 ALLOW_ONLY_INLINE_ALLOCATION();
229 public: 239 public:
230 StringOrArrayBufferOrArrayBufferView(); 240 StringOrArrayBufferOrArrayBufferView();
231 bool isNull() const { return m_type == SpecificTypeNone; } 241 bool isNull() const { return m_type == SpecificTypeNone; }
232 242
233 bool isString() const { return m_type == SpecificTypeString; } 243 bool isString() const { return m_type == SpecificTypeString; }
234 String getAsString() const; 244 String getAsString() const;
235 void setString(String); 245 void setString(String);
246 static StringOrArrayBufferOrArrayBufferView fromString(String);
236 247
237 bool isArrayBuffer() const { return m_type == SpecificTypeArrayBuffer; } 248 bool isArrayBuffer() const { return m_type == SpecificTypeArrayBuffer; }
238 PassRefPtr<TestArrayBuffer> getAsArrayBuffer() const; 249 PassRefPtr<TestArrayBuffer> getAsArrayBuffer() const;
239 void setArrayBuffer(PassRefPtr<TestArrayBuffer>); 250 void setArrayBuffer(PassRefPtr<TestArrayBuffer>);
251 static StringOrArrayBufferOrArrayBufferView fromArrayBuffer(PassRefPtr<TestA rrayBuffer>);
240 252
241 bool isArrayBufferView() const { return m_type == SpecificTypeArrayBufferVie w; } 253 bool isArrayBufferView() const { return m_type == SpecificTypeArrayBufferVie w; }
242 PassRefPtr<TestArrayBufferView> getAsArrayBufferView() const; 254 PassRefPtr<TestArrayBufferView> getAsArrayBufferView() const;
243 void setArrayBufferView(PassRefPtr<TestArrayBufferView>); 255 void setArrayBufferView(PassRefPtr<TestArrayBufferView>);
256 static StringOrArrayBufferOrArrayBufferView fromArrayBufferView(PassRefPtr<T estArrayBufferView>);
244 257
245 private: 258 private:
246 enum SpecificTypes { 259 enum SpecificTypes {
247 SpecificTypeNone, 260 SpecificTypeNone,
248 SpecificTypeString, 261 SpecificTypeString,
249 SpecificTypeArrayBuffer, 262 SpecificTypeArrayBuffer,
250 SpecificTypeArrayBufferView, 263 SpecificTypeArrayBufferView,
251 }; 264 };
252 SpecificTypes m_type; 265 SpecificTypes m_type;
253 266
(...skipping 24 matching lines...) Expand all
278 291
279 class StringOrDouble final { 292 class StringOrDouble final {
280 ALLOW_ONLY_INLINE_ALLOCATION(); 293 ALLOW_ONLY_INLINE_ALLOCATION();
281 public: 294 public:
282 StringOrDouble(); 295 StringOrDouble();
283 bool isNull() const { return m_type == SpecificTypeNone; } 296 bool isNull() const { return m_type == SpecificTypeNone; }
284 297
285 bool isString() const { return m_type == SpecificTypeString; } 298 bool isString() const { return m_type == SpecificTypeString; }
286 String getAsString() const; 299 String getAsString() const;
287 void setString(String); 300 void setString(String);
301 static StringOrDouble fromString(String);
288 302
289 bool isDouble() const { return m_type == SpecificTypeDouble; } 303 bool isDouble() const { return m_type == SpecificTypeDouble; }
290 double getAsDouble() const; 304 double getAsDouble() const;
291 void setDouble(double); 305 void setDouble(double);
306 static StringOrDouble fromDouble(double);
292 307
293 private: 308 private:
294 enum SpecificTypes { 309 enum SpecificTypes {
295 SpecificTypeNone, 310 SpecificTypeNone,
296 SpecificTypeString, 311 SpecificTypeString,
297 SpecificTypeDouble, 312 SpecificTypeDouble,
298 }; 313 };
299 SpecificTypes m_type; 314 SpecificTypes m_type;
300 315
301 String m_string; 316 String m_string;
(...skipping 22 matching lines...) Expand all
324 339
325 class StringOrStringSequence final { 340 class StringOrStringSequence final {
326 ALLOW_ONLY_INLINE_ALLOCATION(); 341 ALLOW_ONLY_INLINE_ALLOCATION();
327 public: 342 public:
328 StringOrStringSequence(); 343 StringOrStringSequence();
329 bool isNull() const { return m_type == SpecificTypeNone; } 344 bool isNull() const { return m_type == SpecificTypeNone; }
330 345
331 bool isString() const { return m_type == SpecificTypeString; } 346 bool isString() const { return m_type == SpecificTypeString; }
332 String getAsString() const; 347 String getAsString() const;
333 void setString(String); 348 void setString(String);
349 static StringOrStringSequence fromString(String);
334 350
335 bool isStringSequence() const { return m_type == SpecificTypeStringSequence; } 351 bool isStringSequence() const { return m_type == SpecificTypeStringSequence; }
336 const Vector<String>& getAsStringSequence() const; 352 const Vector<String>& getAsStringSequence() const;
337 void setStringSequence(const Vector<String>&); 353 void setStringSequence(const Vector<String>&);
354 static StringOrStringSequence fromStringSequence(const Vector<String>&);
338 355
339 private: 356 private:
340 enum SpecificTypes { 357 enum SpecificTypes {
341 SpecificTypeNone, 358 SpecificTypeNone,
342 SpecificTypeString, 359 SpecificTypeString,
343 SpecificTypeStringSequence, 360 SpecificTypeStringSequence,
344 }; 361 };
345 SpecificTypes m_type; 362 SpecificTypes m_type;
346 363
347 String m_string; 364 String m_string;
(...skipping 22 matching lines...) Expand all
370 387
371 class TestEnumOrDouble final { 388 class TestEnumOrDouble final {
372 ALLOW_ONLY_INLINE_ALLOCATION(); 389 ALLOW_ONLY_INLINE_ALLOCATION();
373 public: 390 public:
374 TestEnumOrDouble(); 391 TestEnumOrDouble();
375 bool isNull() const { return m_type == SpecificTypeNone; } 392 bool isNull() const { return m_type == SpecificTypeNone; }
376 393
377 bool isTestEnum() const { return m_type == SpecificTypeTestEnum; } 394 bool isTestEnum() const { return m_type == SpecificTypeTestEnum; }
378 String getAsTestEnum() const; 395 String getAsTestEnum() const;
379 void setTestEnum(String); 396 void setTestEnum(String);
397 static TestEnumOrDouble fromTestEnum(String);
380 398
381 bool isDouble() const { return m_type == SpecificTypeDouble; } 399 bool isDouble() const { return m_type == SpecificTypeDouble; }
382 double getAsDouble() const; 400 double getAsDouble() const;
383 void setDouble(double); 401 void setDouble(double);
402 static TestEnumOrDouble fromDouble(double);
384 403
385 private: 404 private:
386 enum SpecificTypes { 405 enum SpecificTypes {
387 SpecificTypeNone, 406 SpecificTypeNone,
388 SpecificTypeTestEnum, 407 SpecificTypeTestEnum,
389 SpecificTypeDouble, 408 SpecificTypeDouble,
390 }; 409 };
391 SpecificTypes m_type; 410 SpecificTypes m_type;
392 411
393 String m_testEnum; 412 String m_testEnum;
(...skipping 22 matching lines...) Expand all
416 435
417 class TestInterface2OrUint8Array final { 436 class TestInterface2OrUint8Array final {
418 ALLOW_ONLY_INLINE_ALLOCATION(); 437 ALLOW_ONLY_INLINE_ALLOCATION();
419 public: 438 public:
420 TestInterface2OrUint8Array(); 439 TestInterface2OrUint8Array();
421 bool isNull() const { return m_type == SpecificTypeNone; } 440 bool isNull() const { return m_type == SpecificTypeNone; }
422 441
423 bool isTestInterface2() const { return m_type == SpecificTypeTestInterface2; } 442 bool isTestInterface2() const { return m_type == SpecificTypeTestInterface2; }
424 PassRefPtr<TestInterface2> getAsTestInterface2() const; 443 PassRefPtr<TestInterface2> getAsTestInterface2() const;
425 void setTestInterface2(PassRefPtr<TestInterface2>); 444 void setTestInterface2(PassRefPtr<TestInterface2>);
445 static TestInterface2OrUint8Array fromTestInterface2(PassRefPtr<TestInterfac e2>);
426 446
427 bool isUint8Array() const { return m_type == SpecificTypeUint8Array; } 447 bool isUint8Array() const { return m_type == SpecificTypeUint8Array; }
428 PassRefPtr<DOMUint8Array> getAsUint8Array() const; 448 PassRefPtr<DOMUint8Array> getAsUint8Array() const;
429 void setUint8Array(PassRefPtr<DOMUint8Array>); 449 void setUint8Array(PassRefPtr<DOMUint8Array>);
450 static TestInterface2OrUint8Array fromUint8Array(PassRefPtr<DOMUint8Array>);
430 451
431 private: 452 private:
432 enum SpecificTypes { 453 enum SpecificTypes {
433 SpecificTypeNone, 454 SpecificTypeNone,
434 SpecificTypeTestInterface2, 455 SpecificTypeTestInterface2,
435 SpecificTypeUint8Array, 456 SpecificTypeUint8Array,
436 }; 457 };
437 SpecificTypes m_type; 458 SpecificTypes m_type;
438 459
439 RefPtr<TestInterface2> m_testInterface2; 460 RefPtr<TestInterface2> m_testInterface2;
(...skipping 22 matching lines...) Expand all
462 483
463 class TestInterfaceGarbageCollectedOrString final { 484 class TestInterfaceGarbageCollectedOrString final {
464 ALLOW_ONLY_INLINE_ALLOCATION(); 485 ALLOW_ONLY_INLINE_ALLOCATION();
465 public: 486 public:
466 TestInterfaceGarbageCollectedOrString(); 487 TestInterfaceGarbageCollectedOrString();
467 bool isNull() const { return m_type == SpecificTypeNone; } 488 bool isNull() const { return m_type == SpecificTypeNone; }
468 489
469 bool isTestInterfaceGarbageCollected() const { return m_type == SpecificType TestInterfaceGarbageCollected; } 490 bool isTestInterfaceGarbageCollected() const { return m_type == SpecificType TestInterfaceGarbageCollected; }
470 TestInterfaceGarbageCollected* getAsTestInterfaceGarbageCollected() const; 491 TestInterfaceGarbageCollected* getAsTestInterfaceGarbageCollected() const;
471 void setTestInterfaceGarbageCollected(TestInterfaceGarbageCollected*); 492 void setTestInterfaceGarbageCollected(TestInterfaceGarbageCollected*);
493 static TestInterfaceGarbageCollectedOrString fromTestInterfaceGarbageCollect ed(TestInterfaceGarbageCollected*);
472 494
473 bool isString() const { return m_type == SpecificTypeString; } 495 bool isString() const { return m_type == SpecificTypeString; }
474 String getAsString() const; 496 String getAsString() const;
475 void setString(String); 497 void setString(String);
498 static TestInterfaceGarbageCollectedOrString fromString(String);
476 499
477 void trace(Visitor*); 500 void trace(Visitor*);
478 501
479 private: 502 private:
480 enum SpecificTypes { 503 enum SpecificTypes {
481 SpecificTypeNone, 504 SpecificTypeNone,
482 SpecificTypeTestInterfaceGarbageCollected, 505 SpecificTypeTestInterfaceGarbageCollected,
483 SpecificTypeString, 506 SpecificTypeString,
484 }; 507 };
485 SpecificTypes m_type; 508 SpecificTypes m_type;
(...skipping 24 matching lines...) Expand all
510 533
511 class TestInterfaceOrLong final { 534 class TestInterfaceOrLong final {
512 ALLOW_ONLY_INLINE_ALLOCATION(); 535 ALLOW_ONLY_INLINE_ALLOCATION();
513 public: 536 public:
514 TestInterfaceOrLong(); 537 TestInterfaceOrLong();
515 bool isNull() const { return m_type == SpecificTypeNone; } 538 bool isNull() const { return m_type == SpecificTypeNone; }
516 539
517 bool isTestInterface() const { return m_type == SpecificTypeTestInterface; } 540 bool isTestInterface() const { return m_type == SpecificTypeTestInterface; }
518 PassRefPtr<TestInterfaceImplementation> getAsTestInterface() const; 541 PassRefPtr<TestInterfaceImplementation> getAsTestInterface() const;
519 void setTestInterface(PassRefPtr<TestInterfaceImplementation>); 542 void setTestInterface(PassRefPtr<TestInterfaceImplementation>);
543 static TestInterfaceOrLong fromTestInterface(PassRefPtr<TestInterfaceImpleme ntation>);
520 544
521 bool isLong() const { return m_type == SpecificTypeLong; } 545 bool isLong() const { return m_type == SpecificTypeLong; }
522 int getAsLong() const; 546 int getAsLong() const;
523 void setLong(int); 547 void setLong(int);
548 static TestInterfaceOrLong fromLong(int);
524 549
525 private: 550 private:
526 enum SpecificTypes { 551 enum SpecificTypes {
527 SpecificTypeNone, 552 SpecificTypeNone,
528 SpecificTypeTestInterface, 553 SpecificTypeTestInterface,
529 SpecificTypeLong, 554 SpecificTypeLong,
530 }; 555 };
531 SpecificTypes m_type; 556 SpecificTypes m_type;
532 557
533 RefPtr<TestInterfaceImplementation> m_testInterface; 558 RefPtr<TestInterfaceImplementation> m_testInterface;
(...skipping 22 matching lines...) Expand all
556 581
557 class TestInterfaceOrTestInterfaceEmpty final { 582 class TestInterfaceOrTestInterfaceEmpty final {
558 ALLOW_ONLY_INLINE_ALLOCATION(); 583 ALLOW_ONLY_INLINE_ALLOCATION();
559 public: 584 public:
560 TestInterfaceOrTestInterfaceEmpty(); 585 TestInterfaceOrTestInterfaceEmpty();
561 bool isNull() const { return m_type == SpecificTypeNone; } 586 bool isNull() const { return m_type == SpecificTypeNone; }
562 587
563 bool isTestInterface() const { return m_type == SpecificTypeTestInterface; } 588 bool isTestInterface() const { return m_type == SpecificTypeTestInterface; }
564 PassRefPtr<TestInterfaceImplementation> getAsTestInterface() const; 589 PassRefPtr<TestInterfaceImplementation> getAsTestInterface() const;
565 void setTestInterface(PassRefPtr<TestInterfaceImplementation>); 590 void setTestInterface(PassRefPtr<TestInterfaceImplementation>);
591 static TestInterfaceOrTestInterfaceEmpty fromTestInterface(PassRefPtr<TestIn terfaceImplementation>);
566 592
567 bool isTestInterfaceEmpty() const { return m_type == SpecificTypeTestInterfa ceEmpty; } 593 bool isTestInterfaceEmpty() const { return m_type == SpecificTypeTestInterfa ceEmpty; }
568 PassRefPtr<TestInterfaceEmpty> getAsTestInterfaceEmpty() const; 594 PassRefPtr<TestInterfaceEmpty> getAsTestInterfaceEmpty() const;
569 void setTestInterfaceEmpty(PassRefPtr<TestInterfaceEmpty>); 595 void setTestInterfaceEmpty(PassRefPtr<TestInterfaceEmpty>);
596 static TestInterfaceOrTestInterfaceEmpty fromTestInterfaceEmpty(PassRefPtr<T estInterfaceEmpty>);
570 597
571 private: 598 private:
572 enum SpecificTypes { 599 enum SpecificTypes {
573 SpecificTypeNone, 600 SpecificTypeNone,
574 SpecificTypeTestInterface, 601 SpecificTypeTestInterface,
575 SpecificTypeTestInterfaceEmpty, 602 SpecificTypeTestInterfaceEmpty,
576 }; 603 };
577 SpecificTypes m_type; 604 SpecificTypes m_type;
578 605
579 RefPtr<TestInterfaceImplementation> m_testInterface; 606 RefPtr<TestInterfaceImplementation> m_testInterface;
(...skipping 22 matching lines...) Expand all
602 629
603 class TestInterfaceWillBeGarbageCollectedOrTestDictionary final { 630 class TestInterfaceWillBeGarbageCollectedOrTestDictionary final {
604 ALLOW_ONLY_INLINE_ALLOCATION(); 631 ALLOW_ONLY_INLINE_ALLOCATION();
605 public: 632 public:
606 TestInterfaceWillBeGarbageCollectedOrTestDictionary(); 633 TestInterfaceWillBeGarbageCollectedOrTestDictionary();
607 bool isNull() const { return m_type == SpecificTypeNone; } 634 bool isNull() const { return m_type == SpecificTypeNone; }
608 635
609 bool isTestInterfaceWillBeGarbageCollected() const { return m_type == Specif icTypeTestInterfaceWillBeGarbageCollected; } 636 bool isTestInterfaceWillBeGarbageCollected() const { return m_type == Specif icTypeTestInterfaceWillBeGarbageCollected; }
610 PassRefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> getAsTestInterfa ceWillBeGarbageCollected() const; 637 PassRefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> getAsTestInterfa ceWillBeGarbageCollected() const;
611 void setTestInterfaceWillBeGarbageCollected(PassRefPtrWillBeRawPtr<TestInter faceWillBeGarbageCollected>); 638 void setTestInterfaceWillBeGarbageCollected(PassRefPtrWillBeRawPtr<TestInter faceWillBeGarbageCollected>);
639 static TestInterfaceWillBeGarbageCollectedOrTestDictionary fromTestInterface WillBeGarbageCollected(PassRefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollecte d>);
612 640
613 bool isTestDictionary() const { return m_type == SpecificTypeTestDictionary; } 641 bool isTestDictionary() const { return m_type == SpecificTypeTestDictionary; }
614 TestDictionary getAsTestDictionary() const; 642 TestDictionary getAsTestDictionary() const;
615 void setTestDictionary(TestDictionary); 643 void setTestDictionary(TestDictionary);
644 static TestInterfaceWillBeGarbageCollectedOrTestDictionary fromTestDictionar y(TestDictionary);
616 645
617 void trace(Visitor*); 646 void trace(Visitor*);
618 647
619 private: 648 private:
620 enum SpecificTypes { 649 enum SpecificTypes {
621 SpecificTypeNone, 650 SpecificTypeNone,
622 SpecificTypeTestInterfaceWillBeGarbageCollected, 651 SpecificTypeTestInterfaceWillBeGarbageCollected,
623 SpecificTypeTestDictionary, 652 SpecificTypeTestDictionary,
624 }; 653 };
625 SpecificTypes m_type; 654 SpecificTypes m_type;
(...skipping 24 matching lines...) Expand all
650 679
651 class UnrestrictedDoubleOrString final { 680 class UnrestrictedDoubleOrString final {
652 ALLOW_ONLY_INLINE_ALLOCATION(); 681 ALLOW_ONLY_INLINE_ALLOCATION();
653 public: 682 public:
654 UnrestrictedDoubleOrString(); 683 UnrestrictedDoubleOrString();
655 bool isNull() const { return m_type == SpecificTypeNone; } 684 bool isNull() const { return m_type == SpecificTypeNone; }
656 685
657 bool isUnrestrictedDouble() const { return m_type == SpecificTypeUnrestricte dDouble; } 686 bool isUnrestrictedDouble() const { return m_type == SpecificTypeUnrestricte dDouble; }
658 double getAsUnrestrictedDouble() const; 687 double getAsUnrestrictedDouble() const;
659 void setUnrestrictedDouble(double); 688 void setUnrestrictedDouble(double);
689 static UnrestrictedDoubleOrString fromUnrestrictedDouble(double);
660 690
661 bool isString() const { return m_type == SpecificTypeString; } 691 bool isString() const { return m_type == SpecificTypeString; }
662 String getAsString() const; 692 String getAsString() const;
663 void setString(String); 693 void setString(String);
694 static UnrestrictedDoubleOrString fromString(String);
664 695
665 private: 696 private:
666 enum SpecificTypes { 697 enum SpecificTypes {
667 SpecificTypeNone, 698 SpecificTypeNone,
668 SpecificTypeUnrestrictedDouble, 699 SpecificTypeUnrestrictedDouble,
669 SpecificTypeString, 700 SpecificTypeString,
670 }; 701 };
671 SpecificTypes m_type; 702 SpecificTypes m_type;
672 703
673 double m_unrestrictedDouble; 704 double m_unrestrictedDouble;
(...skipping 26 matching lines...) Expand all
700 { 731 {
701 if (isUndefinedOrNull(v8Value)) 732 if (isUndefinedOrNull(v8Value))
702 return; 733 return;
703 V8DoubleOrString::toImpl(isolate, v8Value, impl, exceptionState); 734 V8DoubleOrString::toImpl(isolate, v8Value, impl, exceptionState);
704 } 735 }
705 }; 736 };
706 737
707 } // namespace blink 738 } // namespace blink
708 739
709 #endif // UnionTypeCore_h 740 #endif // UnionTypeCore_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698