diff options
author | leon.han <leon.han@intel.com> | 2015-06-18 19:25:48 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-19 02:26:31 +0000 |
commit | d20a6c4cd820214f99f525044a9f89a85a948ef3 (patch) | |
tree | b1b3cf47be252bf6eb976730bc5f72892ed7fc2e /ipc/mojo/ipc_channel_mojo.h | |
parent | 3358582856dc6a0768a9316c9d8e7c8ca4dcfd7f (diff) | |
download | chromium_src-d20a6c4cd820214f99f525044a9f89a85a948ef3.zip chromium_src-d20a6c4cd820214f99f525044a9f89a85a948ef3.tar.gz chromium_src-d20a6c4cd820214f99f525044a9f89a85a948ef3.tar.bz2 |
Release obigation to call ChannelMojoHost::OnClientLaunched()
Currently, to establish ChannelMojo connection,
server process MUST know the client process handle.
This CL is to release the obigation.
IntentToImpl is discussed in
https://groups.google.com/a/chromium.org/forum/#!topic/mojo-dev/Qpb9Qonbmys
TBR=morrita@chromium.org,agl@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1129063005
Cr-Commit-Position: refs/heads/master@{#335192}
Diffstat (limited to 'ipc/mojo/ipc_channel_mojo.h')
-rw-r--r-- | ipc/mojo/ipc_channel_mojo.h | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/ipc/mojo/ipc_channel_mojo.h b/ipc/mojo/ipc_channel_mojo.h index b84a6e3..6b7d2fc 100644 --- a/ipc/mojo/ipc_channel_mojo.h +++ b/ipc/mojo/ipc_channel_mojo.h @@ -57,21 +57,12 @@ class IPC_MOJO_EXPORT ChannelMojo base::Callback<void(mojo::ScopedMessagePipeHandle, mojo::embedder::ChannelInfo*)>; - class Delegate { - public: - virtual ~Delegate() {} - virtual base::WeakPtr<Delegate> ToWeakPtr() = 0; - virtual void OnChannelCreated(base::WeakPtr<ChannelMojo> channel) = 0; - }; - // True if ChannelMojo should be used regardless of the flag. static bool ShouldBeUsed(); // Create ChannelMojo. A bootstrap channel is created as well. - // |host| must not be null for server channels. // |broker| must outlive the newly created channel. static scoped_ptr<ChannelMojo> Create( - Delegate* delegate, scoped_refptr<base::TaskRunner> io_runner, const ChannelHandle& channel_handle, Mode mode, @@ -86,7 +77,6 @@ class IPC_MOJO_EXPORT ChannelMojo // http://crbug.com/493414. // |broker| must outlive the factory and all channels it creates. static scoped_ptr<ChannelFactory> CreateServerFactory( - Delegate* delegate, scoped_refptr<base::TaskRunner> io_runner, const ChannelHandle& channel_handle, AttachmentBroker* broker = nullptr); @@ -96,16 +86,12 @@ class IPC_MOJO_EXPORT ChannelMojo // http://crbug.com/493414. // |broker| must outlive the factory and all channels it creates. static scoped_ptr<ChannelFactory> CreateClientFactory( - Delegate* delegate, scoped_refptr<base::TaskRunner> io_runner, const ChannelHandle& channel_handle, AttachmentBroker* broker = nullptr); ~ChannelMojo() override; - // ChannelMojoHost tells the client handle using this API. - void OnClientLaunched(base::ProcessHandle handle); - // Channel implementation bool Connect() override; void Close() override; @@ -137,8 +123,7 @@ class IPC_MOJO_EXPORT ChannelMojo void OnPipeError(internal::MessagePipeReader* reader) override; protected: - ChannelMojo(Delegate* delegate, - scoped_refptr<base::TaskRunner> io_runner, + ChannelMojo(scoped_refptr<base::TaskRunner> io_runner, const ChannelHandle& channel_handle, Mode mode, Listener* listener, @@ -166,7 +151,7 @@ class IPC_MOJO_EXPORT ChannelMojo // notifications invoked by them. typedef internal::MessagePipeReader::DelayedDeleter ReaderDeleter; - void InitOnIOThread(ChannelMojo::Delegate* delegate); + void InitOnIOThread(); static void CreateMessagingPipeOnIOThread( mojo::embedder::ScopedPlatformHandle handle, @@ -177,7 +162,6 @@ class IPC_MOJO_EXPORT ChannelMojo mojo::embedder::ChannelInfo* channel_info); scoped_ptr<MojoBootstrap> bootstrap_; - base::WeakPtr<Delegate> delegate_; Mode mode_; Listener* listener_; base::ProcessId peer_pid_; |