Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1146)

Unified Diff: content/browser/loader/url_loader_factory_impl.h

Issue 1970693002: Use mojo for Chrome Loading, Part 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/loader/test_url_loader_client.cc ('k') | content/browser/loader/url_loader_factory_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/url_loader_factory_impl.h
diff --git a/content/browser/loader/url_loader_factory_impl.h b/content/browser/loader/url_loader_factory_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..28fd1ee99d71628d2ff4f96514febe3778d413ec
--- /dev/null
+++ b/content/browser/loader/url_loader_factory_impl.h
@@ -0,0 +1,49 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_LOADER_URL_LOADER_FACTORY_IMPL_H_
+#define CONTENT_BROWSER_LOADER_URL_LOADER_FACTORY_IMPL_H_
+
+#include "base/macros.h"
+#include "base/memory/ref_counted.h"
+#include "content/common/content_export.h"
+#include "content/common/url_loader_factory.mojom.h"
+#include "mojo/public/cpp/bindings/interface_request.h"
+#include "mojo/public/cpp/bindings/strong_binding.h"
+
+namespace content {
+
+class ResourceMessageFilter;
+
+// This class is an implementation of mojom::URLLoaderFactory that creates
+// a mojom::URLLoader.
+class URLLoaderFactoryImpl final : public mojom::URLLoaderFactory {
+ public:
+ ~URLLoaderFactoryImpl() override;
+
+ void CreateLoaderAndStart(mojom::URLLoaderRequest request,
+ int32_t request_id,
+ const ResourceRequest& url_request,
+ mojom::URLLoaderClientPtr client) override;
+
+ // Creates a URLLoaderFactoryImpl instance. The instance is held by the
+ // StrongBinding in it, so this function doesn't return the instance.
+ CONTENT_EXPORT static void Create(
+ scoped_refptr<ResourceMessageFilter> resource_message_filter,
+ mojo::InterfaceRequest<mojom::URLLoaderFactory> request);
+
+ private:
+ URLLoaderFactoryImpl(
+ scoped_refptr<ResourceMessageFilter> resource_message_filter,
+ mojo::InterfaceRequest<mojom::URLLoaderFactory> request);
+
+ scoped_refptr<ResourceMessageFilter> resource_message_filter_;
+ mojo::StrongBinding<mojom::URLLoaderFactory> binding_;
+
+ DISALLOW_COPY_AND_ASSIGN(URLLoaderFactoryImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_LOADER_URL_LOADER_FACTORY_IMPL_H_
« no previous file with comments | « content/browser/loader/test_url_loader_client.cc ('k') | content/browser/loader/url_loader_factory_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698