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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 #include "content/public/common/resource_type.h" | 152 #include "content/public/common/resource_type.h" |
153 #include "content/public/common/result_codes.h" | 153 #include "content/public/common/result_codes.h" |
154 #include "content/public/common/sandboxed_process_launcher_delegate.h" | 154 #include "content/public/common/sandboxed_process_launcher_delegate.h" |
155 #include "content/public/common/url_constants.h" | 155 #include "content/public/common/url_constants.h" |
156 #include "device/battery/battery_monitor_impl.h" | 156 #include "device/battery/battery_monitor_impl.h" |
157 #include "device/vibration/vibration_manager_impl.h" | 157 #include "device/vibration/vibration_manager_impl.h" |
158 #include "gpu/GLES2/gl2extchromium.h" | 158 #include "gpu/GLES2/gl2extchromium.h" |
159 #include "gpu/command_buffer/client/gpu_switches.h" | 159 #include "gpu/command_buffer/client/gpu_switches.h" |
160 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 160 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
161 #include "gpu/command_buffer/service/gpu_switches.h" | 161 #include "gpu/command_buffer/service/gpu_switches.h" |
162 #include "ipc/attachment_broker.h" | |
163 #include "ipc/attachment_broker_privileged.h" | |
164 #include "ipc/ipc_channel.h" | 162 #include "ipc/ipc_channel.h" |
165 #include "ipc/ipc_logging.h" | 163 #include "ipc/ipc_logging.h" |
166 #include "ipc/ipc_switches.h" | 164 #include "ipc/ipc_switches.h" |
167 #include "ipc/mojo/ipc_channel_mojo.h" | 165 #include "ipc/mojo/ipc_channel_mojo.h" |
168 #include "media/base/media_switches.h" | 166 #include "media/base/media_switches.h" |
169 #include "mojo/edk/embedder/embedder.h" | 167 #include "mojo/edk/embedder/embedder.h" |
170 #include "mojo/shell/runner/common/switches.h" | 168 #include "mojo/shell/runner/common/switches.h" |
171 #include "net/url_request/url_request_context_getter.h" | 169 #include "net/url_request/url_request_context_getter.h" |
172 #include "ppapi/shared_impl/ppapi_switches.h" | 170 #include "ppapi/shared_impl/ppapi_switches.h" |
173 #include "storage/browser/fileapi/sandbox_file_system_backend.h" | 171 #include "storage/browser/fileapi/sandbox_file_system_backend.h" |
(...skipping 18 matching lines...) Expand all Loading... |
192 #include "base/win/windows_version.h" | 190 #include "base/win/windows_version.h" |
193 #include "content/browser/renderer_host/dwrite_font_proxy_message_filter_win.h" | 191 #include "content/browser/renderer_host/dwrite_font_proxy_message_filter_win.h" |
194 #include "content/common/font_cache_dispatcher_win.h" | 192 #include "content/common/font_cache_dispatcher_win.h" |
195 #include "content/common/sandbox_win.h" | 193 #include "content/common/sandbox_win.h" |
196 #include "sandbox/win/src/sandbox_policy.h" | 194 #include "sandbox/win/src/sandbox_policy.h" |
197 #include "ui/gfx/win/dpi.h" | 195 #include "ui/gfx/win/dpi.h" |
198 #endif | 196 #endif |
199 | 197 |
200 #if defined(OS_MACOSX) && !defined(OS_IOS) | 198 #if defined(OS_MACOSX) && !defined(OS_IOS) |
201 #include "content/browser/bootstrap_sandbox_manager_mac.h" | 199 #include "content/browser/bootstrap_sandbox_manager_mac.h" |
202 #include "content/browser/mach_broker_mac.h" | |
203 #endif | 200 #endif |
204 | 201 |
205 #if defined(OS_POSIX) | 202 #if defined(OS_POSIX) |
206 #include "content/browser/zygote_host/zygote_communication_linux.h" | 203 #include "content/browser/zygote_host/zygote_communication_linux.h" |
207 #include "content/browser/zygote_host/zygote_host_impl_linux.h" | 204 #include "content/browser/zygote_host/zygote_host_impl_linux.h" |
208 #include "content/public/browser/zygote_handle_linux.h" | 205 #include "content/public/browser/zygote_handle_linux.h" |
209 #endif // defined(OS_POSIX) | 206 #endif // defined(OS_POSIX) |
210 | 207 |
211 #if defined(USE_OZONE) | 208 #if defined(USE_OZONE) |
212 #include "ui/ozone/public/client_native_pixmap_factory.h" | 209 #include "ui/ozone/public/client_native_pixmap_factory.h" |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 storage_partition_impl_->GetPath())); | 599 storage_partition_impl_->GetPath())); |
603 } | 600 } |
604 subscribe_uniform_enabled_ = | 601 subscribe_uniform_enabled_ = |
605 base::CommandLine::ForCurrentProcess()->HasSwitch( | 602 base::CommandLine::ForCurrentProcess()->HasSwitch( |
606 switches::kEnableSubscribeUniformExtension); | 603 switches::kEnableSubscribeUniformExtension); |
607 | 604 |
608 #if defined(OS_MACOSX) | 605 #if defined(OS_MACOSX) |
609 if (BootstrapSandboxManager::ShouldEnable()) | 606 if (BootstrapSandboxManager::ShouldEnable()) |
610 AddObserver(BootstrapSandboxManager::GetInstance()); | 607 AddObserver(BootstrapSandboxManager::GetInstance()); |
611 #endif | 608 #endif |
612 | |
613 #if USE_ATTACHMENT_BROKER | |
614 // Construct the privileged attachment broker early in the life cycle of a | |
615 // render process. This ensures that when a test is being run in one of the | |
616 // single process modes, the global attachment broker is the privileged | |
617 // attachment broker, rather than an unprivileged attachment broker. | |
618 #if defined(OS_MACOSX) && !defined(OS_IOS) | |
619 IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded( | |
620 MachBroker::GetInstance()); | |
621 #else | |
622 IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded(); | |
623 #endif // defined(OS_MACOSX) && !defined(OS_IOS) | |
624 #endif // USE_ATTACHMENT_BROKER | |
625 #if defined(OS_MACOSX) && !defined(OS_IOS) | |
626 mojo::edk::SetMachPortProviderIfNeeded(MachBroker::GetInstance()); | |
627 #endif // defined(OS_MACOSX) && !defined(OS_IOS) | |
628 } | 609 } |
629 | 610 |
630 // static | 611 // static |
631 void RenderProcessHostImpl::ShutDownInProcessRenderer() { | 612 void RenderProcessHostImpl::ShutDownInProcessRenderer() { |
632 DCHECK(g_run_renderer_in_process_); | 613 DCHECK(g_run_renderer_in_process_); |
633 | 614 |
634 switch (g_all_hosts.Pointer()->size()) { | 615 switch (g_all_hosts.Pointer()->size()) { |
635 case 0: | 616 case 0: |
636 return; | 617 return; |
637 case 1: { | 618 case 1: { |
(...skipping 2184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2822 | 2803 |
2823 // Skip widgets in other processes. | 2804 // Skip widgets in other processes. |
2824 if (rvh->GetProcess()->GetID() != GetID()) | 2805 if (rvh->GetProcess()->GetID() != GetID()) |
2825 continue; | 2806 continue; |
2826 | 2807 |
2827 rvh->OnWebkitPreferencesChanged(); | 2808 rvh->OnWebkitPreferencesChanged(); |
2828 } | 2809 } |
2829 } | 2810 } |
2830 | 2811 |
2831 } // namespace content | 2812 } // namespace content |
OLD | NEW |