OLD | NEW |
| (Empty) |
1 // Copyright 2017 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. | |
4 | |
5 module content.mojom; | |
6 | |
7 import "mojo/common/file_path.mojom"; | |
8 import "url_loader.mojom"; | |
9 import "url_loader_factory.mojom"; | |
10 import "url/mojo/url.mojom"; | |
11 | |
12 // Parameters for constructing a network context. | |
13 struct NetworkContextParams { | |
14 // Points to the cookie file. If null, an in-memory database is used. | |
15 mojo.common.mojom.FilePath? cookie_path; | |
16 // Points to the cache directory. If null, an in-memory database is used. | |
17 mojo.common.mojom.FilePath? cache_dir; | |
18 }; | |
19 | |
20 // Represents a distinct context for making network requests, with its own | |
21 // storage (e.g. cookies and cache). | |
22 interface NetworkContext { | |
23 // |process_id| is 0 for requests initiated in the browser process, otherwise | |
24 // it's the child process ID. | |
25 CreateURLLoaderFactory(URLLoaderFactory& url_loader_factory, | |
26 uint32 process_id); | |
27 | |
28 // Handle a request to display cache data to the user. |url| is parsed to | |
29 // display different parts of the cache. | |
30 HandleViewCacheRequest(url.mojom.Url url, | |
31 URLLoaderClient client); | |
32 }; | |
33 | |
34 // Browser interface to the network service. | |
35 interface NetworkService { | |
36 // Creates a new network context with the given parameters. | |
37 CreateNetworkContext(NetworkContext& context, | |
38 NetworkContextParams params); | |
39 }; | |
OLD | NEW |