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

Unified Diff: ipc/ipc_mojo_bootstrap.cc

Issue 2668153003: Mojo C++ Bindings: Eliminate unbound ThreadSafeInterfacePtr (Closed)
Patch Set: format and rebase... Created 3 years, 10 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_mojo_bootstrap.h ('k') | ipc/ipc_mojo_bootstrap_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_mojo_bootstrap.cc
diff --git a/ipc/ipc_mojo_bootstrap.cc b/ipc/ipc_mojo_bootstrap.cc
index 68454aea73348bf2a8e6676616da5d73cc9fc8e5..5e6f5459a763a00dc5dea1bcb3635e220829e9e3 100644
--- a/ipc/ipc_mojo_bootstrap.cc
+++ b/ipc/ipc_mojo_bootstrap.cc
@@ -885,11 +885,8 @@ class MojoBootstrapImpl : public MojoBootstrap {
public:
MojoBootstrapImpl(
mojo::ScopedMessagePipeHandle handle,
- Delegate* delegate,
const scoped_refptr<ChannelAssociatedGroupController> controller)
- : controller_(controller),
- handle_(std::move(handle)),
- delegate_(delegate) {
+ : controller_(controller), handle_(std::move(handle)) {
associated_group_ = controller_->CreateAssociatedGroup();
}
@@ -898,15 +895,10 @@ class MojoBootstrapImpl : public MojoBootstrap {
}
private:
- // MojoBootstrap:
- void Connect() override {
+ void Connect(mojom::ChannelAssociatedPtr* sender,
+ mojom::ChannelAssociatedRequest* receiver) override {
controller_->Bind(std::move(handle_));
-
- IPC::mojom::ChannelAssociatedPtr sender;
- IPC::mojom::ChannelAssociatedRequest receiver;
- controller_->CreateChannelEndpoints(&sender, &receiver);
-
- delegate_->OnPipesAvailable(std::move(sender), std::move(receiver));
+ controller_->CreateChannelEndpoints(sender, receiver);
}
void Pause() override {
@@ -928,7 +920,6 @@ class MojoBootstrapImpl : public MojoBootstrap {
scoped_refptr<ChannelAssociatedGroupController> controller_;
mojo::ScopedMessagePipeHandle handle_;
- Delegate* delegate_;
std::unique_ptr<mojo::AssociatedGroup> associated_group_;
DISALLOW_COPY_AND_ASSIGN(MojoBootstrapImpl);
@@ -940,12 +931,10 @@ class MojoBootstrapImpl : public MojoBootstrap {
std::unique_ptr<MojoBootstrap> MojoBootstrap::Create(
mojo::ScopedMessagePipeHandle handle,
Channel::Mode mode,
- Delegate* delegate,
const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner) {
return base::MakeUnique<MojoBootstrapImpl>(
- std::move(handle), delegate,
- new ChannelAssociatedGroupController(mode == Channel::MODE_SERVER,
- ipc_task_runner));
+ std::move(handle), new ChannelAssociatedGroupController(
+ mode == Channel::MODE_SERVER, ipc_task_runner));
}
} // namespace IPC
« no previous file with comments | « ipc/ipc_mojo_bootstrap.h ('k') | ipc/ipc_mojo_bootstrap_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698