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

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

Issue 2449933003: Use Associated interfaces for mojo-loading (Closed)
Patch Set: fix Created 4 years, 1 month 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/resource_message_filter.cc ('k') | content/browser/loader/test_url_loader_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/test_url_loader_client.h
diff --git a/content/browser/loader/test_url_loader_client.h b/content/browser/loader/test_url_loader_client.h
index 78cb46f3f278d646d46f4384b96d952833ed26ee..3059a4d3d9e4b036e9ba97d077f69e078203497a 100644
--- a/content/browser/loader/test_url_loader_client.h
+++ b/content/browser/loader/test_url_loader_client.h
@@ -9,9 +9,10 @@
#include "base/macros.h"
#include "content/common/resource_request_completion_status.h"
#include "content/common/url_loader.mojom.h"
+#include "content/common/url_loader_factory.mojom.h"
#include "content/public/common/resource_response.h"
#include "mojo/public/c/system/data_pipe.h"
-#include "mojo/public/cpp/bindings/binding.h"
+#include "mojo/public/cpp/bindings/associated_binding.h"
namespace content {
@@ -36,8 +37,17 @@ class TestURLLoaderClient final : public mojom::URLLoaderClient {
const ResourceRequestCompletionStatus& completion_status() const {
return completion_status_;
}
+ // Creates an AssociatedPtrInfo which is a proxy for |*this| and returns it.
+ // The returned PtrInfo is marked as local, i.e., expected to be bound
+ // locally.
+ mojom::URLLoaderClientAssociatedPtrInfo CreateLocalAssociatedPtrInfo();
+
+ // Creates an AssociatedPtrInfo, binds it to |*this| and returns it. The
+ // returned PtrInfo is marked as remote, i.e., expected to be passed to the
+ // remote endpoint.
+ mojom::URLLoaderClientAssociatedPtrInfo CreateRemoteAssociatedPtrInfo(
+ mojo::AssociatedGroup* associated_group);
- mojom::URLLoaderClientPtr CreateInterfacePtrAndBind();
void Unbind();
void RunUntilResponseReceived();
@@ -45,7 +55,7 @@ class TestURLLoaderClient final : public mojom::URLLoaderClient {
void RunUntilComplete();
private:
- mojo::Binding<mojom::URLLoaderClient> binding_;
+ mojo::AssociatedBinding<mojom::URLLoaderClient> binding_;
ResourceResponseHead response_head_;
mojo::ScopedDataPipeConsumerHandle response_body_;
ResourceRequestCompletionStatus completion_status_;
@@ -54,6 +64,7 @@ class TestURLLoaderClient final : public mojom::URLLoaderClient {
base::Closure quit_closure_for_on_received_response_;
base::Closure quit_closure_for_on_start_loading_response_body_;
base::Closure quit_closure_for_on_complete_;
+ mojom::URLLoaderFactoryPtr url_loader_factory_;
DISALLOW_COPY_AND_ASSIGN(TestURLLoaderClient);
};
« no previous file with comments | « content/browser/loader/resource_message_filter.cc ('k') | content/browser/loader/test_url_loader_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698