| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/edk/system/ipc_support.h" | 5 #include "mojo/edk/system/ipc_support.h" |
| 6 | 6 |
| 7 #include <type_traits> | 7 #include <type_traits> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 connection_manager_.reset( | 60 connection_manager_.reset( |
| 61 new system::SlaveConnectionManager(platform_support)); | 61 new system::SlaveConnectionManager(platform_support)); |
| 62 static_cast<system::SlaveConnectionManager*>(connection_manager_.get()) | 62 static_cast<system::SlaveConnectionManager*>(connection_manager_.get()) |
| 63 ->Init( | 63 ->Init( |
| 64 delegate_thread_task_runner_.Clone(), | 64 delegate_thread_task_runner_.Clone(), |
| 65 static_cast<embedder::SlaveProcessDelegate*>(process_delegate_), | 65 static_cast<embedder::SlaveProcessDelegate*>(process_delegate_), |
| 66 platform_handle.Pass()); | 66 platform_handle.Pass()); |
| 67 break; | 67 break; |
| 68 } | 68 } |
| 69 | 69 |
| 70 channel_manager_.reset(new ChannelManager( | 70 channel_manager_.reset( |
| 71 platform_support, io_task_runner_.Clone(), connection_manager_.get())); | 71 new ChannelManager(platform_support, io_task_runner_.Clone(), io_watcher_, |
| 72 connection_manager_.get())); |
| 72 } | 73 } |
| 73 | 74 |
| 74 IPCSupport::~IPCSupport() { | 75 IPCSupport::~IPCSupport() { |
| 75 DCHECK_EQ(process_type_, embedder::ProcessType::UNINITIALIZED); | 76 DCHECK_EQ(process_type_, embedder::ProcessType::UNINITIALIZED); |
| 76 } | 77 } |
| 77 | 78 |
| 78 void IPCSupport::ShutdownOnIOThread() { | 79 void IPCSupport::ShutdownOnIOThread() { |
| 79 DCHECK_NE(process_type_, embedder::ProcessType::UNINITIALIZED); | 80 DCHECK_NE(process_type_, embedder::ProcessType::UNINITIALIZED); |
| 80 | 81 |
| 81 channel_manager_->ShutdownOnIOThread(); | 82 channel_manager_->ShutdownOnIOThread(); |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 CHECK_EQ(connection_manager()->Connect(connection_id, &peer_id, &is_first, | 169 CHECK_EQ(connection_manager()->Connect(connection_id, &peer_id, &is_first, |
| 169 &platform_connection_handle), | 170 &platform_connection_handle), |
| 170 ConnectionManager::Result::SUCCESS_CONNECT_NEW_CONNECTION); | 171 ConnectionManager::Result::SUCCESS_CONNECT_NEW_CONNECTION); |
| 171 DCHECK_EQ(peer_id, system::kMasterProcessIdentifier); | 172 DCHECK_EQ(peer_id, system::kMasterProcessIdentifier); |
| 172 DCHECK(platform_connection_handle.is_valid()); | 173 DCHECK(platform_connection_handle.is_valid()); |
| 173 return platform_connection_handle; | 174 return platform_connection_handle; |
| 174 } | 175 } |
| 175 | 176 |
| 176 } // namespace system | 177 } // namespace system |
| 177 } // namespace mojo | 178 } // namespace mojo |
| OLD | NEW |