OLD | NEW |
| (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 #ifndef WebNFCMessage_h | |
6 #define WebNFCMessage_h | |
7 | |
8 #include "public/platform/WebData.h" | |
9 #include "public/platform/WebString.h" | |
10 #include "public/platform/WebURL.h" | |
11 #include "public/platform/WebVector.h" | |
12 | |
13 namespace blink { | |
14 | |
15 // Enumeration that is mapped to NFCRecordType as specified in IDL. | |
16 enum class WebNFCRecordType { | |
17 Empty, | |
18 Text, | |
19 Url, | |
20 Json, | |
21 Opaque, | |
22 ENUM_MAX_VALUE = Opaque | |
23 }; | |
24 | |
25 // Contains members of NFCRecord dictionary as specified in the IDL. | |
26 struct WebNFCRecord { | |
27 WebNFCRecordType recordType; | |
28 WebString mediaType; | |
29 WebData data; | |
30 }; | |
31 | |
32 // Contains members of NFCMessage dictionary as specified in the IDL. | |
33 struct WebNFCMessage { | |
34 WebNFCMessage(WebVector<WebNFCRecord>& data, const WebURL& url) | |
35 : data(data) | |
36 , url(url) | |
37 { | |
38 } | |
39 | |
40 WebVector<WebNFCRecord> data; | |
41 WebURL url; | |
42 }; | |
43 | |
44 } // namespace blink | |
45 | |
46 #endif // WebNFCMessage_h | |
OLD | NEW |