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

Side by Side Diff: third_party/WebKit/Source/core/testing/RecordTest.h

Issue 2732093003: bindings: Add support for the record<K,V> WebIDL type. (Closed)
Patch Set: s/isolate->GetCurrentContext()/context/ Created 3 years, 9 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
(Empty)
1 // Copyright 2017 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 #ifndef RecordTest_h
6 #define RecordTest_h
7
8 #include <utility>
9 #include "bindings/core/v8/BooleanOrByteStringByteStringRecord.h"
10 #include "bindings/core/v8/FloatOrStringElementRecord.h"
11 #include "bindings/core/v8/Nullable.h"
12 #include "bindings/core/v8/ScriptWrappable.h"
13 #include "core/dom/Element.h"
14 #include "platform/heap/Handle.h"
15 #include "wtf/Vector.h"
16 #include "wtf/text/WTFString.h"
17
18 namespace blink {
19
20 class RecordTest final : public GarbageCollectedFinalized<RecordTest>,
21 public ScriptWrappable {
22 DEFINE_WRAPPERTYPEINFO();
23
24 public:
25 static RecordTest* create() { return new RecordTest; }
26 ~RecordTest();
27
28 void setStringLongRecord(const Vector<std::pair<String, int32_t>>& arg);
29 Vector<std::pair<String, int32_t>> getStringLongRecord();
30
31 void setNullableStringLongRecord(
32 const Nullable<Vector<std::pair<String, int32_t>>>& arg);
33 Nullable<Vector<std::pair<String, int32_t>>> getNullableStringLongRecord();
34
35 Vector<std::pair<String, String>> getByteStringByteStringRecord();
36 void setByteStringByteStringRecord(
37 const Vector<std::pair<String, String>>& arg);
38
39 void setStringElementRecord(
40 const HeapVector<std::pair<String, Member<Element>>>& arg);
41 HeapVector<std::pair<String, Member<Element>>> getStringElementRecord();
42
43 using NestedRecordType =
44 Vector<std::pair<String, Vector<std::pair<String, bool>>>>;
45 void setUSVStringUSVStringBooleanRecordRecord(const NestedRecordType& arg);
46 NestedRecordType getUSVStringUSVStringBooleanRecordRecord();
47
48 Vector<std::pair<String, Vector<String>>>
49 returnStringByteStringSequenceRecord();
50
51 bool unionReceivedARecord(const BooleanOrByteStringByteStringRecord& arg);
52
53 void setFloatOrStringElementRecord(const FloatOrStringElementRecord&){};
54
55 DECLARE_TRACE();
56
57 private:
58 RecordTest();
59
60 Vector<std::pair<String, int32_t>> m_stringLongRecord;
61 Nullable<Vector<std::pair<String, int32_t>>> m_nullableStringLongRecord;
62 Vector<std::pair<String, String>> m_byteStringByteStringRecord;
63 HeapVector<std::pair<String, Member<Element>>> m_stringElementRecord;
64 NestedRecordType m_USVStringUSVStringBooleanRecordRecord;
65 };
66
67 } // namespace blink
68
69 #endif // RecordTest_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/testing/Internals.idl ('k') | third_party/WebKit/Source/core/testing/RecordTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698