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

Unified Diff: content/common/associated_interface_provider_impl.h

Issue 2352533003: [Autofill] Migrate ChromePasswordManagerClient<-->PasswordGenerationAgent IPCs to mojo. (Closed)
Patch Set: Rebase only 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 | « components/password_manager/content/DEPS ('k') | content/common/associated_interface_provider_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/associated_interface_provider_impl.h
diff --git a/content/common/associated_interface_provider_impl.h b/content/common/associated_interface_provider_impl.h
index af01ce55427a5ee9fa6916635c7e066d05ca206a..32670b2cbffce197fb0cea46a59f3aa18e773e0c 100644
--- a/content/common/associated_interface_provider_impl.h
+++ b/content/common/associated_interface_provider_impl.h
@@ -5,10 +5,10 @@
#include "content/public/common/associated_interface_provider.h"
#include <stdint.h>
+#include <memory>
#include "base/macros.h"
#include "content/common/associated_interfaces.mojom.h"
-#include "mojo/public/cpp/bindings/associated_group.h"
namespace content {
@@ -17,16 +17,28 @@ class AssociatedInterfaceProviderImpl : public AssociatedInterfaceProvider {
// Binds this to a remote mojom::AssociatedInterfaceProvider.
explicit AssociatedInterfaceProviderImpl(
mojom::AssociatedInterfaceProviderAssociatedPtr proxy);
+ // Constructs a local provider with no remote interfaces. This is useful in
+ // conjunction with OverrideBinderForTesting(), in test environments where
+ // there may not be a remote |mojom::AssociatedInterfaceProvider| available.
+ AssociatedInterfaceProviderImpl();
~AssociatedInterfaceProviderImpl() override;
// AssociatedInterfaceProvider:
void GetInterface(const std::string& name,
mojo::ScopedInterfaceEndpointHandle handle) override;
mojo::AssociatedGroup* GetAssociatedGroup() override;
+ void OverrideBinderForTesting(
+ const std::string& name,
+ const base::Callback<void(mojo::ScopedInterfaceEndpointHandle)>& binder)
+ override;
private:
+ class LocalProvider;
+
mojom::AssociatedInterfaceProviderAssociatedPtr proxy_;
+ std::unique_ptr<LocalProvider> local_provider_;
+
DISALLOW_COPY_AND_ASSIGN(AssociatedInterfaceProviderImpl);
};
« no previous file with comments | « components/password_manager/content/DEPS ('k') | content/common/associated_interface_provider_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698