OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 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 // Put Mojo definitions into their own namespace to avoid collisions with C++ | |
6 // definitions. | |
7 // TODO(amistry): Resolve the conflict between these two sets of definitions. | |
8 module net.interfaces; | |
9 | |
10 import "host_resolver_service.mojom"; | |
11 | |
12 // Partial mirror of net::LoadState. Only contains values possible by the | |
13 // proxy resolver. | |
14 enum LoadState { | |
15 RESOLVING_PROXY_FOR_URL, | |
16 RESOLVING_HOST_IN_PROXY_SCRIPT, | |
17 }; | |
18 | |
19 interface ProxyResolverService { | |
20 SetPacScript(string data) => (int32 result); | |
21 | |
22 // Use a ProxyResolveRequestClient instead of returning a result so we can | |
eroman
2015/02/03 04:53:29
I see, you are using "ResolveClient" throughout.
Anand Mistry (off Chromium)
2015/02/03 06:27:22
Changed to "Resolver" everywhere. I agree it's bet
| |
23 // receive load state updates and cancel in-flight requests by destroying the | |
24 // client. | |
25 // TODO(amistry): Add BoundNetLog. | |
26 GetProxyForUrl(string url, ProxyResolveRequestClient client); | |
27 }; | |
28 | |
29 interface ProxyResolveRequestClient { | |
30 ReportResult(int32 error, string? pac_string); | |
eroman
2015/02/03 04:53:29
I can certainly understand wanting to return a PAC
Anand Mistry (off Chromium)
2015/02/03 06:27:22
Looks straight forward. Might as well change it ri
| |
31 UpdateLoadState(LoadState load_state); | |
eroman
2015/02/03 04:53:29
Can you give some details on how this will work?
Anand Mistry (off Chromium)
2015/02/03 06:27:22
So, I had an explanation on how this would work...
Sam McNally
2015/02/03 23:51:30
I think we should punt on LoadState for now.
eroman
2015/02/04 01:25:20
Agreed (punt on LoadState for now), it can return
| |
32 }; | |
33 | |
34 interface ProxyResolverErrorObserver { | |
35 OnPacScriptError(int32 line_number, string error); | |
36 }; | |
37 | |
38 interface ProxyResolverFactory { | |
39 // TODO(amistry): Add NetLog. | |
40 CreateResolver(ProxyResolverService& resolver, | |
eroman
2015/02/03 04:53:29
Forgive me for not being familiar with mojo (yet!)
Anand Mistry (off Chromium)
2015/02/03 06:27:22
There are two ends to an interface, the client (ca
| |
41 HostResolverService host_resolver, | |
42 ProxyResolverErrorObserver error_observer); | |
43 }; | |
OLD | NEW |