OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 // Represents the browser side of the browser <--> renderer communication | 5 // Represents the browser side of the browser <--> renderer communication |
6 // channel. There will be one RenderProcessHost per renderer process. | 6 // channel. There will be one RenderProcessHost per renderer process. |
7 | 7 |
8 #include "content/browser/renderer_host/render_process_host_impl.h" | 8 #include "content/browser/renderer_host/render_process_host_impl.h" |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 2115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2126 void RenderProcessHostImpl::OnChannelConnected(int32_t peer_pid) { | 2126 void RenderProcessHostImpl::OnChannelConnected(int32_t peer_pid) { |
2127 channel_connected_ = true; | 2127 channel_connected_ = true; |
2128 if (IsReady()) { | 2128 if (IsReady()) { |
2129 DCHECK(!sent_render_process_ready_); | 2129 DCHECK(!sent_render_process_ready_); |
2130 sent_render_process_ready_ = true; | 2130 sent_render_process_ready_ = true; |
2131 // Send RenderProcessReady only if we already received the process handle. | 2131 // Send RenderProcessReady only if we already received the process handle. |
2132 for (auto& observer : observers_) | 2132 for (auto& observer : observers_) |
2133 observer.RenderProcessReady(this); | 2133 observer.RenderProcessReady(this); |
2134 } | 2134 } |
2135 | 2135 |
2136 #if BUILDFLAG(IPC_MESSAGE_LOG_ENABLED) | 2136 #if defined(IPC_MESSAGE_LOG_ENABLED) |
2137 Send(new ChildProcessMsg_SetIPCLoggingEnabled( | 2137 Send(new ChildProcessMsg_SetIPCLoggingEnabled( |
2138 IPC::Logging::GetInstance()->Enabled())); | 2138 IPC::Logging::GetInstance()->Enabled())); |
2139 #endif | 2139 #endif |
2140 | 2140 |
2141 tracked_objects::ThreadData::Status status = | 2141 tracked_objects::ThreadData::Status status = |
2142 tracked_objects::ThreadData::status(); | 2142 tracked_objects::ThreadData::status(); |
2143 Send(new ChildProcessMsg_SetProfilerStatus(status)); | 2143 Send(new ChildProcessMsg_SetProfilerStatus(status)); |
2144 | 2144 |
2145 // Inform AudioInputRendererHost about the new render process PID. | 2145 // Inform AudioInputRendererHost about the new render process PID. |
2146 // AudioInputRendererHost is reference counted, so its lifetime is | 2146 // AudioInputRendererHost is reference counted, so its lifetime is |
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3092 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 3092 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
3093 | 3093 |
3094 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. | 3094 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. |
3095 // Capture the error message in a crash key value. | 3095 // Capture the error message in a crash key value. |
3096 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); | 3096 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); |
3097 bad_message::ReceivedBadMessage(render_process_id, | 3097 bad_message::ReceivedBadMessage(render_process_id, |
3098 bad_message::RPH_MOJO_PROCESS_ERROR); | 3098 bad_message::RPH_MOJO_PROCESS_ERROR); |
3099 } | 3099 } |
3100 | 3100 |
3101 } // namespace content | 3101 } // namespace content |
OLD | NEW |