| 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 | 214 |
| 215 #if defined(ENABLE_WEBRTC) | 215 #if defined(ENABLE_WEBRTC) |
| 216 #include "content/browser/media/webrtc_internals.h" | 216 #include "content/browser/media/webrtc_internals.h" |
| 217 #include "content/browser/renderer_host/media/media_stream_track_metrics_host.h" | 217 #include "content/browser/renderer_host/media/media_stream_track_metrics_host.h" |
| 218 #include "content/browser/renderer_host/media/webrtc_identity_service_host.h" | 218 #include "content/browser/renderer_host/media/webrtc_identity_service_host.h" |
| 219 #include "content/browser/renderer_host/p2p/socket_dispatcher_host.h" | 219 #include "content/browser/renderer_host/p2p/socket_dispatcher_host.h" |
| 220 #include "content/common/media/aec_dump_messages.h" | 220 #include "content/common/media/aec_dump_messages.h" |
| 221 #include "content/common/media/media_stream_messages.h" | 221 #include "content/common/media/media_stream_messages.h" |
| 222 #endif | 222 #endif |
| 223 | 223 |
| 224 #if defined(MOJO_SHELL_CLIENT) |
| 225 #include "content/browser/mojo/mojo_shell_client_host.h" |
| 226 #endif |
| 227 |
| 224 #if defined(OS_WIN) | 228 #if defined(OS_WIN) |
| 225 #define IntToStringType base::IntToString16 | 229 #define IntToStringType base::IntToString16 |
| 226 #else | 230 #else |
| 227 #define IntToStringType base::IntToString | 231 #define IntToStringType base::IntToString |
| 228 #endif | 232 #endif |
| 229 | 233 |
| 230 namespace content { | 234 namespace content { |
| 231 namespace { | 235 namespace { |
| 232 | 236 |
| 233 const char kSiteProcessMapKeyName[] = "content_site_process_map"; | 237 const char kSiteProcessMapKeyName[] = "content_site_process_map"; |
| (...skipping 2209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2443 // ExtensionService uses this notification to initialize the renderer process | 2447 // ExtensionService uses this notification to initialize the renderer process |
| 2444 // with state that must be there before any JavaScript executes. | 2448 // with state that must be there before any JavaScript executes. |
| 2445 // | 2449 // |
| 2446 // The queued messages contain such things as "navigate". If this notification | 2450 // The queued messages contain such things as "navigate". If this notification |
| 2447 // was after, we can end up executing JavaScript before the initialization | 2451 // was after, we can end up executing JavaScript before the initialization |
| 2448 // happens. | 2452 // happens. |
| 2449 NotificationService::current()->Notify(NOTIFICATION_RENDERER_PROCESS_CREATED, | 2453 NotificationService::current()->Notify(NOTIFICATION_RENDERER_PROCESS_CREATED, |
| 2450 Source<RenderProcessHost>(this), | 2454 Source<RenderProcessHost>(this), |
| 2451 NotificationService::NoDetails()); | 2455 NotificationService::NoDetails()); |
| 2452 | 2456 |
| 2457 #if defined(MOJO_SHELL_CLIENT) |
| 2458 // Send a handle that the external Mojo shell can use to pass an Application |
| 2459 // request to the child. |
| 2460 RegisterChildWithExternalShell(id_, GetHandle(), this); |
| 2461 #endif |
| 2462 |
| 2453 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/465841 | 2463 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/465841 |
| 2454 // is fixed. | 2464 // is fixed. |
| 2455 tracked_objects::ScopedTracker tracking_profile4( | 2465 tracked_objects::ScopedTracker tracking_profile4( |
| 2456 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 2466 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 2457 "465841 RenderProcessHostImpl::OnProcessLaunched::MojoActivate")); | 2467 "465841 RenderProcessHostImpl::OnProcessLaunched::MojoActivate")); |
| 2458 // Allow Mojo to be setup before the renderer sees any Chrome IPC messages. | 2468 // Allow Mojo to be setup before the renderer sees any Chrome IPC messages. |
| 2459 // This way, Mojo can be safely used from the renderer in response to any | 2469 // This way, Mojo can be safely used from the renderer in response to any |
| 2460 // Chrome IPC message. | 2470 // Chrome IPC message. |
| 2461 mojo_application_host_->Activate(this, GetHandle()); | 2471 mojo_application_host_->Activate(this, GetHandle()); |
| 2462 | 2472 |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2637 void RenderProcessHostImpl::GetAudioOutputControllers( | 2647 void RenderProcessHostImpl::GetAudioOutputControllers( |
| 2638 const GetAudioOutputControllersCallback& callback) const { | 2648 const GetAudioOutputControllersCallback& callback) const { |
| 2639 audio_renderer_host()->GetOutputControllers(callback); | 2649 audio_renderer_host()->GetOutputControllers(callback); |
| 2640 } | 2650 } |
| 2641 | 2651 |
| 2642 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { | 2652 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { |
| 2643 return bluetooth_dispatcher_host_.get(); | 2653 return bluetooth_dispatcher_host_.get(); |
| 2644 } | 2654 } |
| 2645 | 2655 |
| 2646 } // namespace content | 2656 } // namespace content |
| OLD | NEW |