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

Unified Diff: ipc/ipc_channel_proxy.h

Issue 2653973002: Remove associated interface registration from ChannelProxy (Closed)
Patch Set: Created 3 years, 11 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 | « ipc/ipc_channel_mojo_unittest.cc ('k') | ipc/ipc_channel_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_proxy.h
diff --git a/ipc/ipc_channel_proxy.h b/ipc/ipc_channel_proxy.h
index ade563ef6eb995e8066cb5182da8978bfcb77461..bda83bb18854299b58c977b6a5a349e76cf4e15b 100644
--- a/ipc/ipc_channel_proxy.h
+++ b/ipc/ipc_channel_proxy.h
@@ -169,14 +169,6 @@ class IPC_EXPORT ChannelProxy : public Sender, public base::NonThreadSafe {
const std::string& name,
const GenericAssociatedInterfaceFactory& factory);
- // Adds a generic associated interface factory to bind incoming interface
- // requests on the ChannelProxy's thread. MUST be called before Init() or
- // before the remote end of the Channel is able to send messages (e.g. before
- // its process is launched.)
- void AddGenericAssociatedInterface(
- const std::string& name,
- const GenericAssociatedInterfaceFactory& factory);
-
template <typename Interface>
using AssociatedInterfaceFactory =
base::Callback<void(mojo::AssociatedInterfaceRequest<Interface>)>;
@@ -193,18 +185,6 @@ class IPC_EXPORT ChannelProxy : public Sender, public base::NonThreadSafe {
factory));
}
- // Helper to bind a ChannelProxy-thread associated interface factory,
- // inferring the interface name from the callback argument's type. MUST be
- // called before Init().
- template <typename Interface>
- void AddAssociatedInterface(
- const AssociatedInterfaceFactory<Interface>& factory) {
- AddGenericAssociatedInterface(
- Interface::Name_,
- base::Bind(&ChannelProxy::BindAssociatedInterfaceRequest<Interface>,
- factory));
- }
-
// Gets the AssociatedGroup used to create new associated endpoints on this
// ChannelProxy.
mojo::AssociatedGroup* GetAssociatedGroup();
@@ -341,9 +321,6 @@ class IPC_EXPORT ChannelProxy : public Sender, public base::NonThreadSafe {
mojo::AssociatedGroup* associated_group() { return &associated_group_; }
- void AddGenericAssociatedInterface(
- const std::string& name,
- const GenericAssociatedInterfaceFactory& factory);
void AddGenericAssociatedInterfaceForIOThread(
const std::string& name,
const GenericAssociatedInterfaceFactory& factory);
@@ -383,12 +360,12 @@ class IPC_EXPORT ChannelProxy : public Sender, public base::NonThreadSafe {
mojo::AssociatedGroup associated_group_;
- // Holds associated interface binders added by AddGenericAssociatedInterface
- // or AddGenericAssociatedInterfaceForIOThread until the underlying channel
- // has been initialized.
- base::Lock pending_interfaces_lock_;
+ // Holds associated interface binders added by
+ // AddGenericAssociatedInterfaceForIOThread until the underlying channel has
+ // been initialized.
+ base::Lock pending_io_thread_interfaces_lock_;
std::vector<std::pair<std::string, GenericAssociatedInterfaceFactory>>
- pending_interfaces_;
+ pending_io_thread_interfaces_;
};
Context* context() { return context_.get(); }
« no previous file with comments | « ipc/ipc_channel_mojo_unittest.cc ('k') | ipc/ipc_channel_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698