| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 #include "content/browser/mojo/service_registrar_android.h" | 184 #include "content/browser/mojo/service_registrar_android.h" |
| 185 #include "content/browser/screen_orientation/screen_orientation_message_filter_a
ndroid.h" | 185 #include "content/browser/screen_orientation/screen_orientation_message_filter_a
ndroid.h" |
| 186 #include "ipc/ipc_sync_channel.h" | 186 #include "ipc/ipc_sync_channel.h" |
| 187 #endif | 187 #endif |
| 188 | 188 |
| 189 #if defined(OS_WIN) | 189 #if defined(OS_WIN) |
| 190 #include "base/win/scoped_com_initializer.h" | 190 #include "base/win/scoped_com_initializer.h" |
| 191 #include "base/win/windows_version.h" | 191 #include "base/win/windows_version.h" |
| 192 #include "content/browser/renderer_host/dwrite_font_proxy_message_filter_win.h" | 192 #include "content/browser/renderer_host/dwrite_font_proxy_message_filter_win.h" |
| 193 #include "content/common/font_cache_dispatcher_win.h" | 193 #include "content/common/font_cache_dispatcher_win.h" |
| 194 #include "content/common/sandbox_win.h" | |
| 195 #include "sandbox/win/src/sandbox_policy.h" | |
| 196 #include "ui/gfx/win/dpi.h" | 194 #include "ui/gfx/win/dpi.h" |
| 197 #endif | 195 #endif |
| 198 | 196 |
| 199 #if defined(OS_MACOSX) | 197 #if defined(OS_MACOSX) |
| 200 #include "content/browser/bootstrap_sandbox_manager_mac.h" | 198 #include "content/browser/bootstrap_sandbox_manager_mac.h" |
| 201 #include "content/browser/mach_broker_mac.h" | 199 #include "content/browser/mach_broker_mac.h" |
| 202 #endif | 200 #endif |
| 203 | 201 |
| 204 #if defined(OS_POSIX) | 202 #if defined(OS_POSIX) |
| 205 #include "content/browser/zygote_host/zygote_communication_linux.h" | 203 #include "content/browser/zygote_host/zygote_communication_linux.h" |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 #if defined(OS_POSIX) | 369 #if defined(OS_POSIX) |
| 372 : ipc_fd_(channel->TakeClientFileDescriptor()) | 370 : ipc_fd_(channel->TakeClientFileDescriptor()) |
| 373 #endif // OS_POSIX | 371 #endif // OS_POSIX |
| 374 { | 372 { |
| 375 } | 373 } |
| 376 | 374 |
| 377 ~RendererSandboxedProcessLauncherDelegate() override {} | 375 ~RendererSandboxedProcessLauncherDelegate() override {} |
| 378 | 376 |
| 379 #if defined(OS_WIN) | 377 #if defined(OS_WIN) |
| 380 bool PreSpawnTarget(sandbox::TargetPolicy* policy) override { | 378 bool PreSpawnTarget(sandbox::TargetPolicy* policy) override { |
| 381 AddBaseHandleClosePolicy(policy); | 379 return true; |
| 382 | |
| 383 const base::string16& sid = | |
| 384 GetContentClient()->browser()->GetAppContainerSidForSandboxType( | |
| 385 GetSandboxType()); | |
| 386 if (!sid.empty()) | |
| 387 AddAppContainerPolicy(policy, sid.c_str()); | |
| 388 | |
| 389 return GetContentClient()->browser()->PreSpawnRenderer(policy); | |
| 390 } | 380 } |
| 391 | 381 |
| 392 #elif defined(OS_POSIX) | 382 #elif defined(OS_POSIX) |
| 393 #if !defined(OS_MACOSX) && !defined(OS_ANDROID) | 383 #if !defined(OS_MACOSX) && !defined(OS_ANDROID) |
| 394 ZygoteHandle* GetZygote() override { | 384 ZygoteHandle* GetZygote() override { |
| 395 const base::CommandLine& browser_command_line = | 385 const base::CommandLine& browser_command_line = |
| 396 *base::CommandLine::ForCurrentProcess(); | 386 *base::CommandLine::ForCurrentProcess(); |
| 397 base::CommandLine::StringType renderer_prefix = | 387 base::CommandLine::StringType renderer_prefix = |
| 398 browser_command_line.GetSwitchValueNative(switches::kRendererCmdPrefix); | 388 browser_command_line.GetSwitchValueNative(switches::kRendererCmdPrefix); |
| 399 if (!renderer_prefix.empty()) | 389 if (!renderer_prefix.empty()) |
| (...skipping 2392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2792 | 2782 |
| 2793 // Skip widgets in other processes. | 2783 // Skip widgets in other processes. |
| 2794 if (rvh->GetProcess()->GetID() != GetID()) | 2784 if (rvh->GetProcess()->GetID() != GetID()) |
| 2795 continue; | 2785 continue; |
| 2796 | 2786 |
| 2797 rvh->OnWebkitPreferencesChanged(); | 2787 rvh->OnWebkitPreferencesChanged(); |
| 2798 } | 2788 } |
| 2799 } | 2789 } |
| 2800 | 2790 |
| 2801 } // namespace content | 2791 } // namespace content |
| OLD | NEW |