| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "mojo/common/channel_init.h" | 5 #include "mojo/embedder/channel_init.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "mojo/embedder/embedder.h" | 9 #include "mojo/embedder/embedder.h" |
| 10 | 10 |
| 11 namespace mojo { | 11 namespace mojo { |
| 12 namespace common { | 12 namespace embedder { |
| 13 | 13 |
| 14 ChannelInit::ChannelInit() | 14 ChannelInit::ChannelInit() |
| 15 : channel_info_(NULL), | 15 : channel_info_(NULL), |
| 16 weak_factory_(this) { | 16 weak_factory_(this) { |
| 17 } | 17 } |
| 18 | 18 |
| 19 ChannelInit::~ChannelInit() { | 19 ChannelInit::~ChannelInit() { |
| 20 if (channel_info_) { | 20 if (channel_info_) { |
| 21 io_thread_task_runner_->PostTask( | 21 io_thread_task_runner_->PostTask( |
| 22 FROM_HERE, | 22 FROM_HERE, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 48 // channel. | 48 // channel. |
| 49 if (!host.get()) { | 49 if (!host.get()) { |
| 50 io_thread->PostTask( | 50 io_thread->PostTask( |
| 51 FROM_HERE, | 51 FROM_HERE, |
| 52 base::Bind(&mojo::embedder::DestroyChannelOnIOThread, channel)); | 52 base::Bind(&mojo::embedder::DestroyChannelOnIOThread, channel)); |
| 53 return; | 53 return; |
| 54 } | 54 } |
| 55 host->channel_info_ = channel; | 55 host->channel_info_ = channel; |
| 56 } | 56 } |
| 57 | 57 |
| 58 } // namespace common | 58 } // namespace embedder |
| 59 } // namespace mojo | 59 } // namespace mojo |
| OLD | NEW |