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

Unified Diff: content/common/associated_interface_provider_impl.h

Issue 2352533003: [Autofill] Migrate ChromePasswordManagerClient<-->PasswordGenerationAgent IPCs to mojo. (Closed)
Patch Set: browser_tests partly Created 4 years, 3 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
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..05d7bc8a52fd24d76066ae0e6f6c112877228e6a 100644
--- a/content/common/associated_interface_provider_impl.h
+++ b/content/common/associated_interface_provider_impl.h
@@ -5,6 +5,7 @@
#include "content/public/common/associated_interface_provider.h"
#include <stdint.h>
+#include <memory>
#include "base/macros.h"
#include "content/common/associated_interfaces.mojom.h"
@@ -12,11 +13,20 @@
namespace content {
+namespace {
+class LocalProvider;
Ken Rockot(use gerrit already) 2016/09/20 18:26:19 Never use anonymous namespaces in headers. LocalP
leonhsl(Using Gerrit) 2016/09/21 11:46:57 Done.
+}
+
class AssociatedInterfaceProviderImpl : public AssociatedInterfaceProvider {
public:
// Binds this to a remote mojom::AssociatedInterfaceProvider.
explicit AssociatedInterfaceProviderImpl(
mojom::AssociatedInterfaceProviderAssociatedPtr proxy);
+ // This constructor is only used for some tests when there has no injected
+ // mojom::AssociatedInterfaceProviderAssociatedPtr. Here will emulate it
+ // by providing self-contained local implementations of both
+ // mojom::RouteProvider and mojom::AssociatedInterfaceProvider.
+ AssociatedInterfaceProviderImpl();
~AssociatedInterfaceProviderImpl() override;
// AssociatedInterfaceProvider:
@@ -25,8 +35,16 @@ class AssociatedInterfaceProviderImpl : public AssociatedInterfaceProvider {
mojo::AssociatedGroup* GetAssociatedGroup() override;
private:
+ void SetBinderForName(
+ const std::string& name,
+ const base::Callback<void(mojo::ScopedInterfaceEndpointHandle)>& binder)
+ override;
+ void ClearBinders() override;
+
mojom::AssociatedInterfaceProviderAssociatedPtr proxy_;
+ std::unique_ptr<LocalProvider> local_provider_;
+
DISALLOW_COPY_AND_ASSIGN(AssociatedInterfaceProviderImpl);
};

Powered by Google App Engine
This is Rietveld 408576698