| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 module mojo; | 5 module mojo; |
| 6 | 6 |
| 7 import "mojo/public/interfaces/network/network_error.mojom"; | 7 import "mojo/public/interfaces/network/network_error.mojom"; |
| 8 import "network/public/interfaces/cookie_store.mojom"; | 8 import "network/public/interfaces/cookie_store.mojom"; |
| 9 import "network/public/interfaces/host_resolver.mojom"; |
| 9 import "network/public/interfaces/http_server.mojom"; | 10 import "network/public/interfaces/http_server.mojom"; |
| 10 import "network/public/interfaces/net_address.mojom"; | 11 import "network/public/interfaces/net_address.mojom"; |
| 11 import "network/public/interfaces/tcp_bound_socket.mojom"; | 12 import "network/public/interfaces/tcp_bound_socket.mojom"; |
| 12 import "network/public/interfaces/tcp_connected_socket.mojom"; | 13 import "network/public/interfaces/tcp_connected_socket.mojom"; |
| 13 import "network/public/interfaces/udp_socket.mojom"; | 14 import "network/public/interfaces/udp_socket.mojom"; |
| 14 import "network/public/interfaces/url_loader.mojom"; | 15 import "network/public/interfaces/url_loader.mojom"; |
| 15 import "network/public/interfaces/url_loader_interceptor.mojom"; | 16 import "network/public/interfaces/url_loader_interceptor.mojom"; |
| 16 import "network/public/interfaces/web_socket.mojom"; | 17 import "network/public/interfaces/web_socket.mojom"; |
| 17 | 18 |
| 18 // TODO Darin suggests that this should probably be two classes. One for | 19 // TODO Darin suggests that this should probably be two classes. One for |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 // pick an available port for the given address, or it can pass 0 for the | 69 // pick an available port for the given address, or it can pass 0 for the |
| 69 // address and port for the OS to pick both the local address and port. In | 70 // address and port for the OS to pick both the local address and port. In |
| 70 // all success cases, the resulting local address will be passed to the | 71 // all success cases, the resulting local address will be passed to the |
| 71 // callback as bound_to. | 72 // callback as bound_to. |
| 72 CreateHttpServer(NetAddress local_address, | 73 CreateHttpServer(NetAddress local_address, |
| 73 HttpServerDelegate delegate) | 74 HttpServerDelegate delegate) |
| 74 => (NetworkError result, | 75 => (NetworkError result, |
| 75 NetAddress? bound_to); | 76 NetAddress? bound_to); |
| 76 | 77 |
| 77 // Register a new url loader interceptor that will be used on any new | 78 // Register a new url loader interceptor that will be used on any new |
| 78 // URLLoader. Interceptor are chained. The last registed interceptor will | 79 // URLLoader created with the current connection to the network service. |
| 79 // received the requests first and the responses last. | 80 // Interceptors are chained. The last registered interceptor will received the |
| 81 // requests first and the responses last. |
| 80 RegisterURLLoaderInterceptor(URLLoaderInterceptorFactory factory); | 82 RegisterURLLoaderInterceptor(URLLoaderInterceptorFactory factory); |
| 83 |
| 84 // Create a HostResolver that can be used to do ip <-> host lookups. |
| 85 CreateHostResolver(HostResolver& host_resolver); |
| 81 }; | 86 }; |
| OLD | NEW |