OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/common/child_process_host_impl.h" | 5 #include "content/common/child_process_host_impl.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/atomic_sequence_num.h" | 9 #include "base/atomic_sequence_num.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 bool initialized = InitChannel(); | 153 bool initialized = InitChannel(); |
154 DCHECK(initialized); | 154 DCHECK(initialized); |
155 } | 155 } |
156 | 156 |
157 bool ChildProcessHostImpl::InitChannel() { | 157 bool ChildProcessHostImpl::InitChannel() { |
158 if (!channel_->Connect()) | 158 if (!channel_->Connect()) |
159 return false; | 159 return false; |
160 | 160 |
161 for (size_t i = 0; i < filters_.size(); ++i) | 161 for (size_t i = 0; i < filters_.size(); ++i) |
162 filters_[i]->OnFilterAdded(channel_.get()); | 162 filters_[i]->OnFilterAdded(channel_.get()); |
| 163 delegate_->OnChannelInitialized(channel_.get()); |
163 | 164 |
164 // Make sure these messages get sent first. | 165 // Make sure these messages get sent first. |
165 #if defined(IPC_MESSAGE_LOG_ENABLED) | 166 #if defined(IPC_MESSAGE_LOG_ENABLED) |
166 bool enabled = IPC::Logging::GetInstance()->Enabled(); | 167 bool enabled = IPC::Logging::GetInstance()->Enabled(); |
167 Send(new ChildProcessMsg_SetIPCLoggingEnabled(enabled)); | 168 Send(new ChildProcessMsg_SetIPCLoggingEnabled(enabled)); |
168 #endif | 169 #endif |
169 | 170 |
170 opening_channel_ = true; | 171 opening_channel_ = true; |
171 | 172 |
172 return true; | 173 return true; |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 void ChildProcessHostImpl::OnBadMessageReceived(const IPC::Message& message) { | 284 void ChildProcessHostImpl::OnBadMessageReceived(const IPC::Message& message) { |
284 delegate_->OnBadMessageReceived(message); | 285 delegate_->OnBadMessageReceived(message); |
285 } | 286 } |
286 | 287 |
287 void ChildProcessHostImpl::OnShutdownRequest() { | 288 void ChildProcessHostImpl::OnShutdownRequest() { |
288 if (delegate_->CanShutdown()) | 289 if (delegate_->CanShutdown()) |
289 Send(new ChildProcessMsg_Shutdown()); | 290 Send(new ChildProcessMsg_Shutdown()); |
290 } | 291 } |
291 | 292 |
292 } // namespace content | 293 } // namespace content |
OLD | NEW |