Roll src/third_party/WebKit b3f094a:f697bbd (svn 194310:194313)
[chromium-blink-merge.git] / extensions / common / api / diagnostics.idl
blob5f8f31d76aeec545280573d7f442b23006ac1d26
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
3 // found in the LICENSE file.
5 // Use the <code>chrome.diagnostics</code> API to query various properties of
6 // the environment that may be useful for diagnostics.
7 namespace diagnostics {
8 dictionary SendPacketOptions {
9 // Target IP address.
10 DOMString ip;
11 // Packet time to live value. If omitted, the system default value will be
12 // used.
13 long? ttl;
14 // Packet timeout in seconds. If omitted, the system default value will be
15 // used.
16 long? timeout;
17 // Size of the payload. If omitted, the system default value will be used.
18 long? size;
21 dictionary SendPacketResult {
22 // The IP of the host which we receives the ICMP reply from.
23 // The IP may differs from our target IP if the packet's ttl is used up.
24 DOMString ip;
26 // Latency in millisenconds.
27 double latency;
30 callback SendPacketCallback = void(SendPacketResult result);
32 interface Functions {
33 // Send a packet of the given type with the given parameters.
34 static void sendPacket(SendPacketOptions options,
35 SendPacketCallback callback);