Rename InputLatency::ScrollUpdate to Latency::ScrollUpdate
[chromium-blink-merge.git] / net / proxy / mojo_proxy_resolver_factory_impl.h
blob5a4eee2f4cbde253b71c26d9a7c7e270c00dbedb
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 #ifndef NET_PROXY_MOJO_PROXY_RESOLVER_FACTORY_IMPL_H_
6 #define NET_PROXY_MOJO_PROXY_RESOLVER_FACTORY_IMPL_H_
8 #include "base/callback.h"
9 #include "net/interfaces/proxy_resolver_service.mojom.h"
10 #include "net/proxy/proxy_resolver.h"
11 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h"
13 namespace net {
14 class HostResolver;
16 class MojoProxyResolverFactoryImpl : public interfaces::ProxyResolverFactory {
17 public:
18 using Factory = base::Callback<scoped_ptr<ProxyResolver>(
19 HostResolver*,
20 const ProxyResolver::LoadStateChangedCallback&)>;
22 explicit MojoProxyResolverFactoryImpl(
23 mojo::InterfaceRequest<interfaces::ProxyResolverFactory> request);
24 MojoProxyResolverFactoryImpl(
25 const Factory& proxy_resolver_factory,
26 mojo::InterfaceRequest<interfaces::ProxyResolverFactory> request);
28 ~MojoProxyResolverFactoryImpl() override;
30 private:
31 // interfaces::ProxyResolverFactory override.
32 void CreateResolver(mojo::InterfaceRequest<interfaces::ProxyResolver> request,
33 interfaces::HostResolverPtr host_resolver) override;
35 const Factory proxy_resolver_impl_factory_;
36 mojo::StrongBinding<interfaces::ProxyResolverFactory> binding_;
38 DISALLOW_COPY_AND_ASSIGN(MojoProxyResolverFactoryImpl);
41 } // namespace net
43 #endif // NET_PROXY_MOJO_PROXY_RESOLVER_FACTORY_IMPL_H_