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

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

Issue 2433233004: Use BrowserAssociatedInterface for mojo-loading (Closed)
Patch Set: fix Created 4 years, 2 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 | « no previous file | content/browser/loader/resource_message_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/resource_message_filter.h
diff --git a/content/browser/loader/resource_message_filter.h b/content/browser/loader/resource_message_filter.h
index 4037826d7b1ddf8686a94d6e88f0e0bc8191dfa2..2c41532560fc9512ac2ed7bf9d5dc656333fc549 100644
--- a/content/browser/loader/resource_message_filter.h
+++ b/content/browser/loader/resource_message_filter.h
@@ -13,6 +13,8 @@
#include "base/sequenced_task_runner_helpers.h"
#include "content/browser/host_zoom_level_context.h"
#include "content/common/content_export.h"
+#include "content/common/url_loader_factory.mojom.h"
+#include "content/public/browser/browser_associated_interface.h"
#include "content/public/browser/browser_message_filter.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/common/resource_type.h"
@@ -37,7 +39,10 @@ class ServiceWorkerContextWrapper;
// delayed by costly UI processing that may be occuring on the main thread of
// the browser. It also means that any hangs in starting a network request
// will not interfere with browser UI.
-class CONTENT_EXPORT ResourceMessageFilter : public BrowserMessageFilter {
+class CONTENT_EXPORT ResourceMessageFilter
+ : public BrowserMessageFilter,
+ public BrowserAssociatedInterface<mojom::URLLoaderFactory>,
+ public mojom::URLLoaderFactory {
public:
typedef base::Callback<void(ResourceType resource_type,
ResourceContext**,
@@ -94,6 +99,16 @@ class CONTENT_EXPORT ResourceMessageFilter : public BrowserMessageFilter {
base::WeakPtr<ResourceMessageFilter> GetWeakPtr();
+ void CreateLoaderAndStart(mojom::URLLoaderRequest request,
+ int32_t routing_id,
+ int32_t request_id,
+ const ResourceRequest& url_request,
+ mojom::URLLoaderClientPtr client) override;
+ void SyncLoad(int32_t routing_id,
+ int32_t request_id,
+ const ResourceRequest& request,
+ const SyncLoadCallback& callback) override;
+
protected:
// Protected destructor so that we can be overriden in tests.
~ResourceMessageFilter() override;
« no previous file with comments | « no previous file | content/browser/loader/resource_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698