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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 #include "content/browser/tracing/trace_message_filter.h" | 116 #include "content/browser/tracing/trace_message_filter.h" |
117 #include "content/browser/webui/web_ui_controller_factory_registry.h" | 117 #include "content/browser/webui/web_ui_controller_factory_registry.h" |
118 #include "content/common/child_process_host_impl.h" | 118 #include "content/common/child_process_host_impl.h" |
119 #include "content/common/child_process_messages.h" | 119 #include "content/common/child_process_messages.h" |
120 #include "content/common/content_switches_internal.h" | 120 #include "content/common/content_switches_internal.h" |
121 #include "content/common/frame_messages.h" | 121 #include "content/common/frame_messages.h" |
122 #include "content/common/gpu/gpu_messages.h" | 122 #include "content/common/gpu/gpu_messages.h" |
123 #include "content/common/in_process_child_thread_params.h" | 123 #include "content/common/in_process_child_thread_params.h" |
124 #include "content/common/mojo/channel_init.h" | 124 #include "content/common/mojo/channel_init.h" |
125 #include "content/common/mojo/mojo_messages.h" | 125 #include "content/common/mojo/mojo_messages.h" |
| 126 #include "content/common/mojo/mojo_shell_connection_impl.h" |
126 #include "content/common/render_process_messages.h" | 127 #include "content/common/render_process_messages.h" |
127 #include "content/common/resource_messages.h" | 128 #include "content/common/resource_messages.h" |
128 #include "content/common/site_isolation_policy.h" | 129 #include "content/common/site_isolation_policy.h" |
129 #include "content/common/view_messages.h" | 130 #include "content/common/view_messages.h" |
130 #include "content/public/browser/browser_context.h" | 131 #include "content/public/browser/browser_context.h" |
131 #include "content/public/browser/content_browser_client.h" | 132 #include "content/public/browser/content_browser_client.h" |
132 #include "content/public/browser/navigator_connect_context.h" | 133 #include "content/public/browser/navigator_connect_context.h" |
133 #include "content/public/browser/notification_service.h" | 134 #include "content/public/browser/notification_service.h" |
134 #include "content/public/browser/notification_types.h" | 135 #include "content/public/browser/notification_types.h" |
135 #include "content/public/browser/render_process_host_factory.h" | 136 #include "content/public/browser/render_process_host_factory.h" |
(...skipping 1400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1536 | 1537 |
1537 // Add kWaitForDebugger to let renderer process wait for a debugger. | 1538 // Add kWaitForDebugger to let renderer process wait for a debugger. |
1538 if (browser_cmd.HasSwitch(switches::kWaitForDebuggerChildren)) { | 1539 if (browser_cmd.HasSwitch(switches::kWaitForDebuggerChildren)) { |
1539 // Look to pass-on the kWaitForDebugger flag. | 1540 // Look to pass-on the kWaitForDebugger flag. |
1540 std::string value = | 1541 std::string value = |
1541 browser_cmd.GetSwitchValueASCII(switches::kWaitForDebuggerChildren); | 1542 browser_cmd.GetSwitchValueASCII(switches::kWaitForDebuggerChildren); |
1542 if (value.empty() || value == switches::kRendererProcess) { | 1543 if (value.empty() || value == switches::kRendererProcess) { |
1543 renderer_cmd->AppendSwitch(switches::kWaitForDebugger); | 1544 renderer_cmd->AppendSwitch(switches::kWaitForDebugger); |
1544 } | 1545 } |
1545 } | 1546 } |
| 1547 |
| 1548 #if defined(MOJO_SHELL_CLIENT) |
| 1549 if (IsRunningInMojoShell()) |
| 1550 renderer_cmd->AppendSwitch(switches::kEnableMojoShellConnection); |
| 1551 #endif |
1546 } | 1552 } |
1547 | 1553 |
1548 base::ProcessHandle RenderProcessHostImpl::GetHandle() const { | 1554 base::ProcessHandle RenderProcessHostImpl::GetHandle() const { |
1549 if (run_renderer_in_process()) | 1555 if (run_renderer_in_process()) |
1550 return base::GetCurrentProcessHandle(); | 1556 return base::GetCurrentProcessHandle(); |
1551 | 1557 |
1552 if (!child_process_launcher_.get() || child_process_launcher_->IsStarting()) | 1558 if (!child_process_launcher_.get() || child_process_launcher_->IsStarting()) |
1553 return base::kNullProcessHandle; | 1559 return base::kNullProcessHandle; |
1554 | 1560 |
1555 return child_process_launcher_->GetProcess().Handle(); | 1561 return child_process_launcher_->GetProcess().Handle(); |
(...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2653 void RenderProcessHostImpl::GetAudioOutputControllers( | 2659 void RenderProcessHostImpl::GetAudioOutputControllers( |
2654 const GetAudioOutputControllersCallback& callback) const { | 2660 const GetAudioOutputControllersCallback& callback) const { |
2655 audio_renderer_host()->GetOutputControllers(callback); | 2661 audio_renderer_host()->GetOutputControllers(callback); |
2656 } | 2662 } |
2657 | 2663 |
2658 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { | 2664 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { |
2659 return bluetooth_dispatcher_host_.get(); | 2665 return bluetooth_dispatcher_host_.get(); |
2660 } | 2666 } |
2661 | 2667 |
2662 } // namespace content | 2668 } // namespace content |
OLD | NEW |