| 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 #include "content/browser/media/webrtc_internals.h" | 217 #include "content/browser/media/webrtc_internals.h" |
| 218 #include "content/browser/renderer_host/media/media_stream_track_metrics_host.h" | 218 #include "content/browser/renderer_host/media/media_stream_track_metrics_host.h" |
| 219 #include "content/browser/renderer_host/media/webrtc_identity_service_host.h" | 219 #include "content/browser/renderer_host/media/webrtc_identity_service_host.h" |
| 220 #include "content/browser/renderer_host/p2p/socket_dispatcher_host.h" | 220 #include "content/browser/renderer_host/p2p/socket_dispatcher_host.h" |
| 221 #include "content/common/media/aec_dump_messages.h" | 221 #include "content/common/media/aec_dump_messages.h" |
| 222 #include "content/common/media/media_stream_messages.h" | 222 #include "content/common/media/media_stream_messages.h" |
| 223 #endif | 223 #endif |
| 224 | 224 |
| 225 #if defined(MOJO_SHELL_CLIENT) | 225 #if defined(MOJO_SHELL_CLIENT) |
| 226 #include "content/browser/mojo/mojo_shell_client_host.h" | 226 #include "content/browser/mojo/mojo_shell_client_host.h" |
| 227 #include "content/common/mojo/mojo_shell_connection_impl.h" |
| 227 #endif | 228 #endif |
| 228 | 229 |
| 229 #if defined(OS_WIN) | 230 #if defined(OS_WIN) |
| 230 #define IntToStringType base::IntToString16 | 231 #define IntToStringType base::IntToString16 |
| 231 #else | 232 #else |
| 232 #define IntToStringType base::IntToString | 233 #define IntToStringType base::IntToString |
| 233 #endif | 234 #endif |
| 234 | 235 |
| 235 namespace content { | 236 namespace content { |
| 236 namespace { | 237 namespace { |
| (...skipping 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1537 | 1538 |
| 1538 // Add kWaitForDebugger to let renderer process wait for a debugger. | 1539 // Add kWaitForDebugger to let renderer process wait for a debugger. |
| 1539 if (browser_cmd.HasSwitch(switches::kWaitForDebuggerChildren)) { | 1540 if (browser_cmd.HasSwitch(switches::kWaitForDebuggerChildren)) { |
| 1540 // Look to pass-on the kWaitForDebugger flag. | 1541 // Look to pass-on the kWaitForDebugger flag. |
| 1541 std::string value = | 1542 std::string value = |
| 1542 browser_cmd.GetSwitchValueASCII(switches::kWaitForDebuggerChildren); | 1543 browser_cmd.GetSwitchValueASCII(switches::kWaitForDebuggerChildren); |
| 1543 if (value.empty() || value == switches::kRendererProcess) { | 1544 if (value.empty() || value == switches::kRendererProcess) { |
| 1544 renderer_cmd->AppendSwitch(switches::kWaitForDebugger); | 1545 renderer_cmd->AppendSwitch(switches::kWaitForDebugger); |
| 1545 } | 1546 } |
| 1546 } | 1547 } |
| 1548 |
| 1549 #if defined(MOJO_SHELL_CLIENT) |
| 1550 if (IsRunningInMojoShell()) |
| 1551 renderer_cmd->AppendSwitch(switches::kEnableMojoShellConnection); |
| 1552 #endif |
| 1547 } | 1553 } |
| 1548 | 1554 |
| 1549 base::ProcessHandle RenderProcessHostImpl::GetHandle() const { | 1555 base::ProcessHandle RenderProcessHostImpl::GetHandle() const { |
| 1550 if (run_renderer_in_process()) | 1556 if (run_renderer_in_process()) |
| 1551 return base::GetCurrentProcessHandle(); | 1557 return base::GetCurrentProcessHandle(); |
| 1552 | 1558 |
| 1553 if (!child_process_launcher_.get() || child_process_launcher_->IsStarting()) | 1559 if (!child_process_launcher_.get() || child_process_launcher_->IsStarting()) |
| 1554 return base::kNullProcessHandle; | 1560 return base::kNullProcessHandle; |
| 1555 | 1561 |
| 1556 return child_process_launcher_->GetProcess().Handle(); | 1562 return child_process_launcher_->GetProcess().Handle(); |
| (...skipping 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2656 void RenderProcessHostImpl::GetAudioOutputControllers( | 2662 void RenderProcessHostImpl::GetAudioOutputControllers( |
| 2657 const GetAudioOutputControllersCallback& callback) const { | 2663 const GetAudioOutputControllersCallback& callback) const { |
| 2658 audio_renderer_host()->GetOutputControllers(callback); | 2664 audio_renderer_host()->GetOutputControllers(callback); |
| 2659 } | 2665 } |
| 2660 | 2666 |
| 2661 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { | 2667 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { |
| 2662 return bluetooth_dispatcher_host_.get(); | 2668 return bluetooth_dispatcher_host_.get(); |
| 2663 } | 2669 } |
| 2664 | 2670 |
| 2665 } // namespace content | 2671 } // namespace content |
| OLD | NEW |