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 2086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2097 void RenderProcessHostImpl::OnChannelConnected(int32_t peer_pid) { | 2097 void RenderProcessHostImpl::OnChannelConnected(int32_t peer_pid) { |
2098 channel_connected_ = true; | 2098 channel_connected_ = true; |
2099 if (IsReady()) { | 2099 if (IsReady()) { |
2100 DCHECK(!sent_render_process_ready_); | 2100 DCHECK(!sent_render_process_ready_); |
2101 sent_render_process_ready_ = true; | 2101 sent_render_process_ready_ = true; |
2102 // Send RenderProcessReady only if we already received the process handle. | 2102 // Send RenderProcessReady only if we already received the process handle. |
2103 for (auto& observer : observers_) | 2103 for (auto& observer : observers_) |
2104 observer.RenderProcessReady(this); | 2104 observer.RenderProcessReady(this); |
2105 } | 2105 } |
2106 | 2106 |
2107 #if BUILDFLAG(IPC_MESSAGE_LOG_ENABLED) | 2107 #if defined(IPC_MESSAGE_LOG_ENABLED) |
2108 Send(new ChildProcessMsg_SetIPCLoggingEnabled( | 2108 Send(new ChildProcessMsg_SetIPCLoggingEnabled( |
2109 IPC::Logging::GetInstance()->Enabled())); | 2109 IPC::Logging::GetInstance()->Enabled())); |
2110 #endif | 2110 #endif |
2111 | 2111 |
2112 tracked_objects::ThreadData::Status status = | 2112 tracked_objects::ThreadData::Status status = |
2113 tracked_objects::ThreadData::status(); | 2113 tracked_objects::ThreadData::status(); |
2114 Send(new ChildProcessMsg_SetProfilerStatus(status)); | 2114 Send(new ChildProcessMsg_SetProfilerStatus(status)); |
2115 | 2115 |
2116 // Inform AudioInputRendererHost about the new render process PID. | 2116 // Inform AudioInputRendererHost about the new render process PID. |
2117 // AudioInputRendererHost is reference counted, so its lifetime is | 2117 // AudioInputRendererHost is reference counted, so its lifetime is |
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3071 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 3071 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
3072 | 3072 |
3073 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. | 3073 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. |
3074 // Capture the error message in a crash key value. | 3074 // Capture the error message in a crash key value. |
3075 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); | 3075 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); |
3076 bad_message::ReceivedBadMessage(render_process_id, | 3076 bad_message::ReceivedBadMessage(render_process_id, |
3077 bad_message::RPH_MOJO_PROCESS_ERROR); | 3077 bad_message::RPH_MOJO_PROCESS_ERROR); |
3078 } | 3078 } |
3079 | 3079 |
3080 } // namespace content | 3080 } // namespace content |
OLD | NEW |