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 // 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 2069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2080 NotificationService::current()->Notify( | 2080 NotificationService::current()->Notify( |
2081 NOTIFICATION_RENDERER_PROCESS_CREATED, | 2081 NOTIFICATION_RENDERER_PROCESS_CREATED, |
2082 Source<RenderProcessHost>(this), | 2082 Source<RenderProcessHost>(this), |
2083 NotificationService::NoDetails()); | 2083 NotificationService::NoDetails()); |
2084 | 2084 |
2085 // Allow Mojo to be setup before the renderer sees any Chrome IPC messages. | 2085 // Allow Mojo to be setup before the renderer sees any Chrome IPC messages. |
2086 // This way, Mojo can be safely used from the renderer in response to any | 2086 // This way, Mojo can be safely used from the renderer in response to any |
2087 // Chrome IPC message. | 2087 // Chrome IPC message. |
2088 MaybeActivateMojo(); | 2088 MaybeActivateMojo(); |
2089 | 2089 |
2090 channel_->OnClientLaunched(child_process_launcher_->GetHandle()); | |
viettrungluu
2014/09/15 20:19:43
It feels a bit suboptimal to require an extra expl
Hajime Morrita
2014/09/15 22:01:36
Yeah...
I tried that but it didn't work.
A handle
viettrungluu
2014/09/15 22:37:27
I was afraid of something like that.
This design
| |
2091 | |
2090 while (!queued_messages_.empty()) { | 2092 while (!queued_messages_.empty()) { |
2091 Send(queued_messages_.front()); | 2093 Send(queued_messages_.front()); |
2092 queued_messages_.pop(); | 2094 queued_messages_.pop(); |
2093 } | 2095 } |
2094 | 2096 |
2095 #if defined(ENABLE_WEBRTC) | 2097 #if defined(ENABLE_WEBRTC) |
2096 if (WebRTCInternals::GetInstance()->aec_dump_enabled()) | 2098 if (WebRTCInternals::GetInstance()->aec_dump_enabled()) |
2097 EnableAecDump(WebRTCInternals::GetInstance()->aec_dump_file_path()); | 2099 EnableAecDump(WebRTCInternals::GetInstance()->aec_dump_file_path()); |
2098 #endif | 2100 #endif |
2099 } | 2101 } |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2225 if (worker_ref_count_ == 0) | 2227 if (worker_ref_count_ == 0) |
2226 Cleanup(); | 2228 Cleanup(); |
2227 } | 2229 } |
2228 | 2230 |
2229 void RenderProcessHostImpl::EnsureMojoActivated() { | 2231 void RenderProcessHostImpl::EnsureMojoActivated() { |
2230 mojo_activation_required_ = true; | 2232 mojo_activation_required_ = true; |
2231 MaybeActivateMojo(); | 2233 MaybeActivateMojo(); |
2232 } | 2234 } |
2233 | 2235 |
2234 } // namespace content | 2236 } // namespace content |
OLD | NEW |