| 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 [DartPackage="mojo_services"] |
| 5 module mojo; | 6 module mojo; |
| 6 | 7 |
| 8 import "mojo/public/interfaces/network/network_error.mojom"; |
| 7 import "network/interfaces/cookie_store.mojom"; | 9 import "network/interfaces/cookie_store.mojom"; |
| 8 import "network/interfaces/host_resolver.mojom"; | 10 import "network/interfaces/host_resolver.mojom"; |
| 9 import "network/interfaces/http_server.mojom"; | 11 import "network/interfaces/http_server.mojom"; |
| 10 import "network/interfaces/net_address.mojom"; | 12 import "network/interfaces/net_address.mojom"; |
| 11 import "network/interfaces/tcp_bound_socket.mojom"; | 13 import "network/interfaces/tcp_bound_socket.mojom"; |
| 12 import "network/interfaces/tcp_connected_socket.mojom"; | 14 import "network/interfaces/tcp_connected_socket.mojom"; |
| 13 import "network/interfaces/udp_socket.mojom"; | 15 import "network/interfaces/udp_socket.mojom"; |
| 14 import "network/interfaces/url_loader.mojom"; | 16 import "network/interfaces/url_loader.mojom"; |
| 15 import "network/interfaces/url_loader_interceptor.mojom"; | 17 import "network/interfaces/url_loader_interceptor.mojom"; |
| 16 import "network/interfaces/web_socket.mojom"; | 18 import "network/interfaces/web_socket.mojom"; |
| 17 import "third_party/mojo/src/mojo/public/interfaces/network/network_error.mojom"
; | |
| 18 | 19 |
| 19 // TODO Darin suggests that this should probably be two classes. One for | 20 // TODO Darin suggests that this should probably be two classes. One for |
| 20 // high-level origin-build requests like WebSockets and HTTP, and the other for | 21 // high-level origin-build requests like WebSockets and HTTP, and the other for |
| 21 // non-origin-bound low-level stuff like DNS, UDP, and TCP. | 22 // non-origin-bound low-level stuff like DNS, UDP, and TCP. |
| 22 interface NetworkService { | 23 interface NetworkService { |
| 23 CreateURLLoader(URLLoader& loader); | 24 CreateURLLoader(URLLoader& loader); |
| 24 | 25 |
| 25 GetCookieStore(CookieStore& cookie_store); | 26 GetCookieStore(CookieStore& cookie_store); |
| 26 | 27 |
| 27 CreateWebSocket(WebSocket& socket); | 28 CreateWebSocket(WebSocket& socket); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 | 78 |
| 78 // Register a new url loader interceptor that will be used on any new | 79 // Register a new url loader interceptor that will be used on any new |
| 79 // URLLoader created with the current connection to the network service. | 80 // URLLoader created with the current connection to the network service. |
| 80 // Interceptors are chained. The last registered interceptor will received the | 81 // Interceptors are chained. The last registered interceptor will received the |
| 81 // requests first and the responses last. | 82 // requests first and the responses last. |
| 82 RegisterURLLoaderInterceptor(URLLoaderInterceptorFactory factory); | 83 RegisterURLLoaderInterceptor(URLLoaderInterceptorFactory factory); |
| 83 | 84 |
| 84 // Create a HostResolver that can be used to do ip <-> host lookups. | 85 // Create a HostResolver that can be used to do ip <-> host lookups. |
| 85 CreateHostResolver(HostResolver& host_resolver); | 86 CreateHostResolver(HostResolver& host_resolver); |
| 86 }; | 87 }; |
| OLD | NEW |