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

Side by Side Diff: chrome/common/extensions/api/mdns.idl

Issue 1040773002: Limit number of service instances passed to onServiceList listeners. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add new mdns.getMaxServiceInstancesPerEvent() function and update unit tests Created 5 years, 8 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // Use the <code>chrome.mdns</code> API to discover services over mDNS. 5 // Use the <code>chrome.mdns</code> API to discover services over mDNS.
6 // This comprises a subset of the features of the NSD spec: 6 // This comprises a subset of the features of the NSD spec:
7 // http://www.w3.org/TR/discovery-api/ 7 // http://www.w3.org/TR/discovery-api/
8 namespace mdns { 8 namespace mdns {
9 9
10 // Represents a mDNS/DNS-SD service. 10 // Represents a mDNS/DNS-SD service.
11 dictionary MDnsService { 11 dictionary MDnsService {
12 // The service name of an mDNS advertised service, 12 // The service name of an mDNS advertised service,
13 // <instance_name>.<service_type>. 13 // <instance_name>.<service_type>.
14 DOMString serviceName; 14 DOMString serviceName;
15 15
16 // The host:port pair of an mDNS advertised service. 16 // The host:port pair of an mDNS advertised service.
17 DOMString serviceHostPort; 17 DOMString serviceHostPort;
18 18
19 // The IP address of an mDNS advertised service. 19 // The IP address of an mDNS advertised service.
20 DOMString ipAddress; 20 DOMString ipAddress;
21 21
22 // Metadata for an mDNS advertised service. 22 // Metadata for an mDNS advertised service.
23 DOMString[] serviceData; 23 DOMString[] serviceData;
24 }; 24 };
25 25
26 callback GetMaxServiceInstancesPerEvent = void (long n);
27
28 /*
29 enum Constants {
30 MaxServiceInstancesPerEvent = 64
31 //static long getMaxServiceInstancesPerEvent ();
32 }
33 */
34 interface Functions {
35 // The maximum number of service instances that will be included in
not at google - send to devlin 2015/04/01 20:25:58 Sorry for the delay with this review, but I'm addi
Red Daly 2015/04/01 22:52:05 That works for me except I'm trying to commit befo
Red Daly 2015/04/02 22:25:21 Thanks for that - updated. Please take another lo
not at google - send to devlin 2015/04/02 22:36:22 AFAIK Caps is the style for web APIs, e.g. see the
Red Daly 2015/04/03 17:58:55 Done.
36 // onServiceList events. If more instances are available, they may be
37 // truncated from the onServiceList event.
38 static void getMaxServiceInstancesPerEvent (
39 GetMaxServiceInstancesPerEvent callback);
40 };
41
26 interface Events { 42 interface Events {
27 // Event fired to inform clients of the current complete set of known 43 // Event fired to inform clients of the current complete set of known
28 // available services. Clients should only need to store the list from the 44 // available services. Clients should only need to store the list from the
29 // most recent event. The service type that the extension is interested in 45 // most recent event. The service type that the extension is interested in
30 // discovering should be specified as the event filter with the 46 // discovering should be specified as the event filter with the
31 // 'serviceType' key. Not specifying an event filter will not start any 47 // 'serviceType' key. Not specifying an event filter will not start any
32 // discovery listeners. 48 // discovery listeners.
33 [supportsFilters=true] static void onServiceList(MDnsService[] services); 49 [supportsFilters=true] static void onServiceList(MDnsService[] services);
34 }; 50 };
35 }; 51 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698