OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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 CONTENT_BROWSER_LOADER_URL_LOADER_FACTORY_IMPL_H_ |
| 6 #define CONTENT_BROWSER_LOADER_URL_LOADER_FACTORY_IMPL_H_ |
| 7 |
| 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/ref_counted.h" |
| 10 #include "content/common/content_export.h" |
| 11 #include "content/common/url_loader_factory.mojom.h" |
| 12 #include "mojo/public/cpp/bindings/binding.h" |
| 13 #include "mojo/public/cpp/bindings/interface_request.h" |
| 14 |
| 15 namespace content { |
| 16 |
| 17 class ResourceMessageFilter; |
| 18 |
| 19 // This class is an implementation of mojom::URLLoaderFactory that creates |
| 20 // a mojom::URLLoader. |
| 21 class CONTENT_EXPORT URLLoaderFactoryImpl final |
| 22 : NON_EXPORTED_BASE(public mojom::URLLoaderFactory) { |
| 23 public: |
| 24 URLLoaderFactoryImpl( |
| 25 scoped_refptr<ResourceMessageFilter> resource_message_filter, |
| 26 mojo::InterfaceRequest<mojom::URLLoaderFactory> request); |
| 27 ~URLLoaderFactoryImpl() override; |
| 28 |
| 29 void CreateURLLoader(mojom::URLLoaderRequest request) override; |
| 30 |
| 31 private: |
| 32 scoped_refptr<ResourceMessageFilter> resource_message_filter_; |
| 33 mojo::Binding<mojom::URLLoaderFactory> binding_; |
| 34 }; |
| 35 |
| 36 } // namespace content |
| 37 |
| 38 #endif // CONTENT_BROWSER_LOADER_URL_LOADER_FACTORY_IMPL_H_ |
OLD | NEW |