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 MOJO_SERVICES_NETWORK_URL_LOADER_FACTORY_IMPL_H_
6 #define MOJO_SERVICES_NETWORK_URL_LOADER_FACTORY_IMPL_H_
8 #include "base/compiler_specific.h"
9 #include "mojo/application/public/cpp/app_lifetime_helper.h"
10 #include "mojo/services/network/public/interfaces/url_loader_factory.mojom.h"
11 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h"
14 class ApplicationConnection
;
17 class URLLoaderFactoryImpl
: public URLLoaderFactory
{
19 URLLoaderFactoryImpl(ApplicationConnection
* connection
,
20 NetworkContext
* context
,
21 scoped_ptr
<mojo::AppRefCount
> app_refcount
,
22 InterfaceRequest
<URLLoaderFactory
> request
);
23 ~URLLoaderFactoryImpl() override
;
25 // URLLoaderFactory methods:
26 void CreateURLLoader(InterfaceRequest
<URLLoader
> loader
) override
;
29 NetworkContext
* context_
;
30 scoped_ptr
<mojo::AppRefCount
> app_refcount_
;
31 StrongBinding
<URLLoaderFactory
> binding_
;
33 DISALLOW_COPY_AND_ASSIGN(URLLoaderFactoryImpl
);
38 #endif // MOJO_SERVICES_NETWORK_URL_LOADER_FACTORY_IMPL_H_