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 #ifndef NET_PROXY_PROXY_RESOLVER_MOJO_H_ |
| 6 #define NET_PROXY_PROXY_RESOLVER_MOJO_H_ |
| 7 |
| 8 #include "base/logging.h" |
| 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/strings/string16.h" |
| 11 #include "mojo/public/cpp/bindings/interface_impl.h" |
| 12 #include "net/base/completion_callback.h" |
| 13 #include "net/base/load_states.h" |
| 14 #include "net/base/net_export.h" |
| 15 #include "net/proxy/proxy_resolver.h" |
| 16 #include "net/proxy/proxy_resolver.mojom.h" |
| 17 #include "net/proxy/proxy_resolver_script_data.h" |
| 18 #include "url/gurl.h" |
| 19 |
| 20 namespace net { |
| 21 |
| 22 class BoundNetLog; |
| 23 class HostResolver; |
| 24 class ProxyInfo; |
| 25 |
| 26 class NET_EXPORT_PRIVATE ProxyResolverMojo : public ProxyResolver { |
| 27 public: |
| 28 ProxyResolverMojo(mojo::InterfacePtr<proxy::Resolver> resolver, |
| 29 HostResolver* host_resolver); |
| 30 |
| 31 ~ProxyResolverMojo() override; |
| 32 |
| 33 int GetProxyForURL(const GURL& url, |
| 34 ProxyInfo* results, |
| 35 const net::CompletionCallback& callback, |
| 36 RequestHandle* request, |
| 37 const BoundNetLog& net_log) override; |
| 38 void CancelRequest(RequestHandle request) override; |
| 39 LoadState GetLoadState(RequestHandle request) const override; |
| 40 void CancelSetPacScript() override; |
| 41 int SetPacScript(const scoped_refptr<ProxyResolverScriptData>& pac_script, |
| 42 const net::CompletionCallback& callback) override; |
| 43 |
| 44 private: |
| 45 class SetPacScriptJob; |
| 46 |
| 47 mojo::InterfacePtr<proxy::Resolver> resolver_; |
| 48 HostResolver* host_resolver_; |
| 49 base::WeakPtr<SetPacScriptJob> set_pac_script_job_; |
| 50 |
| 51 DISALLOW_COPY_AND_ASSIGN(ProxyResolverMojo); |
| 52 }; |
| 53 |
| 54 } // namespace net |
| 55 |
| 56 #endif // NET_PROXY_PROXY_RESOLVER_MOJO_H_ |
OLD | NEW |