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

Unified Diff: content/public/common/associated_interface_provider.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/public/common/associated_interface_provider.h
diff --git a/content/public/common/associated_interface_provider.h b/content/public/common/associated_interface_provider.h
index f1c495b1a0fbe8cfb278cdeb40a1452cbcfa0a9b..121d18ce0fbe5093d7222f762f4c11451408d5d3 100644
--- a/content/public/common/associated_interface_provider.h
+++ b/content/public/common/associated_interface_provider.h
@@ -31,6 +31,25 @@ namespace content {
// which hosts its corresponding RenderFrame.
class AssociatedInterfaceProvider {
public:
+ class TestApi {
Ken Rockot(use gerrit already) 2016/09/20 18:26:20 I don't think we need to emulate what's done in In
leonhsl(Using Gerrit) 2016/09/21 11:46:57 Done and thanks!
+ public:
+ explicit TestApi(AssociatedInterfaceProvider* provider)
+ : provider_(provider) {}
+ ~TestApi() {}
+
+ void SetBinderForName(const std::string& name,
+ const base::Callback<void(
+ mojo::ScopedInterfaceEndpointHandle)>& binder) {
+ provider_->SetBinderForName(name, binder);
+ }
+
+ void ClearBinders() { provider_->ClearBinders(); }
+
+ private:
+ AssociatedInterfaceProvider* provider_;
+ DISALLOW_COPY_AND_ASSIGN(TestApi);
+ };
+
virtual ~AssociatedInterfaceProvider() {}
// Passes an associated endpoint handle to the remote end to be bound to a
@@ -49,6 +68,13 @@ class AssociatedInterfaceProvider {
mojo::GetProxy(proxy, GetAssociatedGroup());
GetInterface(Interface::Name_, request.PassHandle());
}
+
+ private:
+ virtual void SetBinderForName(
+ const std::string& name,
+ const base::Callback<void(mojo::ScopedInterfaceEndpointHandle)>&
+ binder) = 0;
+ virtual void ClearBinders() = 0;
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698