| 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 import "mojo/services/public/interfaces/network/cookie_store.mojom" | 5 import "mojo/services/public/interfaces/network/cookie_store.mojom" |
| 6 import "mojo/services/public/interfaces/network/net_address.mojom" | 6 import "mojo/services/public/interfaces/network/net_address.mojom" |
| 7 import "mojo/services/public/interfaces/network/network_error.mojom" | 7 import "mojo/services/public/interfaces/network/network_error.mojom" |
| 8 import "mojo/services/public/interfaces/network/tcp_bound_socket.mojom" | 8 import "mojo/services/public/interfaces/network/tcp_bound_socket.mojom" |
| 9 import "mojo/services/public/interfaces/network/tcp_connected_socket.mojom" | 9 import "mojo/services/public/interfaces/network/tcp_connected_socket.mojom" |
| 10 import "mojo/services/public/interfaces/network/udp_socket.mojom" |
| 10 import "mojo/services/public/interfaces/network/url_loader.mojom" | 11 import "mojo/services/public/interfaces/network/url_loader.mojom" |
| 11 import "mojo/services/public/interfaces/network/web_socket.mojom" | 12 import "mojo/services/public/interfaces/network/web_socket.mojom" |
| 12 | 13 |
| 13 module mojo { | 14 module mojo { |
| 14 | 15 |
| 15 // TODO Darin suggfests that this should probably be two classes. One for | 16 // TODO Darin suggfests that this should probably be two classes. One for |
| 16 // high-level origin-build requests like WebSockets and HTTP, and the other for | 17 // high-level origin-build requests like WebSockets and HTTP, and the other for |
| 17 // non-origin-bound low-level stuff like DNS, UDP, and TCP. | 18 // non-origin-bound low-level stuff like DNS, UDP, and TCP. |
| 18 interface NetworkService { | 19 interface NetworkService { |
| 19 CreateURLLoader(URLLoader&? loader); | 20 CreateURLLoader(URLLoader&? loader); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 43 // callback on success. | 44 // callback on success. |
| 44 // | 45 // |
| 45 // If you want control over the local address and port, instead use | 46 // If you want control over the local address and port, instead use |
| 46 // CreateTCPBoundSocket. | 47 // CreateTCPBoundSocket. |
| 47 CreateTCPConnectedSocket(NetAddress remote_address, | 48 CreateTCPConnectedSocket(NetAddress remote_address, |
| 48 handle<data_pipe_consumer> send_stream, | 49 handle<data_pipe_consumer> send_stream, |
| 49 handle<data_pipe_producer> receive_stream, | 50 handle<data_pipe_producer> receive_stream, |
| 50 TCPConnectedSocket& client_socket) | 51 TCPConnectedSocket& client_socket) |
| 51 => (NetworkError result, | 52 => (NetworkError result, |
| 52 NetAddress? local_address); | 53 NetAddress? local_address); |
| 54 |
| 55 CreateUDPSocket(UDPSocket& socket); |
| 53 }; | 56 }; |
| 54 | 57 |
| 55 } | 58 } |
| OLD | NEW |