Chromium Code Reviews| Index: ipc/ipc_channel_proxy.h | 
| diff --git a/ipc/ipc_channel_proxy.h b/ipc/ipc_channel_proxy.h | 
| index 5765630a2582349a9b470785eef7c4ae6842bd0f..4f458ed46672520216a5429c1d49441118486a76 100644 | 
| --- a/ipc/ipc_channel_proxy.h | 
| +++ b/ipc/ipc_channel_proxy.h | 
| @@ -230,6 +230,10 @@ class IPC_EXPORT ChannelProxy : public Sender, public base::NonThreadSafe { | 
| } | 
| #endif | 
| + using RunOnIOThreadCallback = base::Callback<void(Channel*)>; | 
| 
 
Tom Sepez
2016/11/28 18:49:11
nit: The name doesn't really describe that it take
 
Jay Civelli
2016/11/28 22:49:01
Renamed the callback as part of making the API mor
 
 | 
| + // Invokes |callback| on the IO (IPC) thread. | 
| + void RunOnIOThread(const RunOnIOThreadCallback& callback); | 
| + | 
| // Called to clear the pointer to the IPC task runner when it's going away. | 
| void ClearIPCTaskRunner(); | 
| @@ -239,7 +243,6 @@ class IPC_EXPORT ChannelProxy : public Sender, public base::NonThreadSafe { | 
| // to the internal state. | 
| explicit ChannelProxy(Context* context); | 
| - | 
| // Used internally to hold state that is referenced on the IPC thread. | 
| class Context : public base::RefCountedThreadSafe<Context>, | 
| public Listener { | 
| @@ -304,6 +307,7 @@ class IPC_EXPORT ChannelProxy : public Sender, public base::NonThreadSafe { | 
| void OnSendMessage(std::unique_ptr<Message> message_ptr); | 
| void OnAddFilter(); | 
| void OnRemoveFilter(MessageFilter* filter); | 
| + void RunWithChannel(const RunOnIOThreadCallback& callback); | 
| // Methods called on the listener thread. | 
| void AddFilter(MessageFilter* filter); |