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

Side by Side Diff: device/nfc/nfc.mojom

Issue 2524743002: [webnfc] Restrict NFC message size to 32KB (Closed)
Patch Set: Created 4 years 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 2015 The Chromium Authors. All rights reserved. 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 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 // TODO(rockot): This should probably be moved to nfc.mojom. 5 // TODO(rockot): This should probably be moved to nfc.mojom.
6 module device.nfc.mojom; 6 module device.nfc.mojom;
7 7
8 enum NFCErrorType { 8 enum NFCErrorType {
9 SECURITY, 9 SECURITY,
10 NOT_SUPPORTED, 10 NOT_SUPPORTED,
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 }; 59 };
60 60
61 struct NFCMessage { 61 struct NFCMessage {
62 // The body of the NFCMessage is a collection of NFCRecord objects. 62 // The body of the NFCMessage is a collection of NFCRecord objects.
63 array<NFCRecord> data; 63 array<NFCRecord> data;
64 64
65 // The |url| field is an ASCII serialized origin, optionally followed by a URL 65 // The |url| field is an ASCII serialized origin, optionally followed by a URL
66 // path. It represents Web NFC id, that can be used for matching Web NFC 66 // path. It represents Web NFC id, that can be used for matching Web NFC
67 // content with the filter specified by |url| field in NFCWatchOptions. 67 // content with the filter specified by |url| field in NFCWatchOptions.
68 string? url; 68 string? url;
69
70 // Maximum size of NFC message that can be sent over IPC is 32KB.
71 const uint32 kMaxSize = 32768;
69 }; 72 };
70 73
71 struct NFCPushOptions { 74 struct NFCPushOptions {
72 // The target of the push operation. 75 // The target of the push operation.
73 NFCPushTarget target; 76 NFCPushTarget target;
74 77
75 // The timeout for the push operation, in milliseconds. 78 // The timeout for the push operation, in milliseconds.
76 double timeout; 79 double timeout;
77 80
78 // If the property is true, the push operation will suspend active watchers 81 // If the property is true, the push operation will suspend active watchers
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // visibility or focus is lost. 129 // visibility or focus is lost.
127 SuspendNFCOperations(); 130 SuspendNFCOperations();
128 131
129 // Resumes all suspended NFC operations. 132 // Resumes all suspended NFC operations.
130 ResumeNFCOperations(); 133 ResumeNFCOperations();
131 }; 134 };
132 135
133 interface NFCClient { 136 interface NFCClient {
134 OnWatch(array<uint32> watch_ids, NFCMessage message); 137 OnWatch(array<uint32> watch_ids, NFCMessage message);
135 }; 138 };
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/nfc/push.html » ('j') | third_party/WebKit/Source/modules/nfc/NFC.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698