OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // File-level comment to appease parser. Eventually this will not be necessary. | |
6 | |
7 [nodoc] namespace experimental.dns { | 5 [nodoc] namespace experimental.dns { |
8 | 6 |
9 dictionary ResolveCallbackResolveInfo { | 7 dictionary ResolveCallbackResolveInfo { |
10 // The result code. Zero indicates success. | 8 // The result code. Zero indicates success. |
11 long resultCode; | 9 long resultCode; |
12 | 10 |
13 // A string representing the IP address literal. Supplied only if resultCode | 11 // A string representing the IP address literal. Supplied only if resultCode |
14 // indicates success. Note that we presently return only IPv4 addresses. | 12 // indicates success. Note that we presently return only IPv4 addresses. |
15 DOMString? address; | 13 DOMString? address; |
16 }; | 14 }; |
17 | 15 |
18 callback ResolveCallback = void (ResolveCallbackResolveInfo resolveInfo); | 16 callback ResolveCallback = void (ResolveCallbackResolveInfo resolveInfo); |
19 | 17 |
20 interface Functions { | 18 interface Functions { |
21 // Resolves the given hostname or IP address literal. | 19 // Resolves the given hostname or IP address literal. |
22 // |hostname| : The hostname to resolve. | 20 // |hostname| : The hostname to resolve. |
23 // |callback| : Called when the resolution operation completes. | 21 // |callback| : Called when the resolution operation completes. |
24 static void resolve(DOMString hostname, | 22 static void resolve(DOMString hostname, |
25 ResolveCallback callback); | 23 ResolveCallback callback); |
26 }; | 24 }; |
27 | 25 |
28 }; | 26 }; |
OLD | NEW |