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.
5 // Put Mojo definitions into their own namespace to avoid collisions with C++
7 // TODO(amistry): Resolve the conflict between these two sets of definitions.
10 import "host_resolver_service.mojom";
12 // Mirror of net::ProxyServer::Scheme.
23 // Mirror of net::ProxyServer.
27 // |host| and |port| are only valid if |scheme| is not INVALID or DIRECT.
32 interface ProxyResolver {
33 // Use a ProxyResolverRequestClient instead of returning a result so we can
34 // receive load state updates and cancel in-flight requests by destroying the
36 // TODO(amistry): Add BoundNetLog.
37 GetProxyForUrl(string url, ProxyResolverRequestClient client);
40 interface ProxyResolverRequestClient {
41 ReportResult(int32 error, array<ProxyServer>? proxy_servers);
42 LoadStateChanged(int32 load_state);
45 interface ProxyResolverErrorObserver {
46 OnPacScriptError(int32 line_number, string error);
49 interface ProxyResolverFactory {
50 // TODO(amistry): Add NetLog.
51 CreateResolver(string pac_script,
52 ProxyResolver& resolver,
53 HostResolver host_resolver,
54 ProxyResolverErrorObserver? error_observer,
55 ProxyResolverFactoryRequestClient client);
58 interface ProxyResolverFactoryRequestClient {
59 ReportResult(int32 error);