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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 explicit RendererSandboxedProcessLauncherDelegate(IPC::ChannelProxy* channel) | 360 explicit RendererSandboxedProcessLauncherDelegate(IPC::ChannelProxy* channel) |
361 #if defined(OS_POSIX) | 361 #if defined(OS_POSIX) |
362 : ipc_fd_(channel->TakeClientFileDescriptor()) | 362 : ipc_fd_(channel->TakeClientFileDescriptor()) |
363 #endif // OS_POSIX | 363 #endif // OS_POSIX |
364 { | 364 { |
365 } | 365 } |
366 | 366 |
367 ~RendererSandboxedProcessLauncherDelegate() override {} | 367 ~RendererSandboxedProcessLauncherDelegate() override {} |
368 | 368 |
369 #if defined(OS_WIN) | 369 #if defined(OS_WIN) |
370 void PreSpawnTarget(sandbox::TargetPolicy* policy, bool* success) override { | 370 bool PreSpawnTarget(sandbox::TargetPolicy* policy) override { |
371 AddBaseHandleClosePolicy(policy); | 371 AddBaseHandleClosePolicy(policy); |
372 | 372 |
373 const base::string16& sid = | 373 const base::string16& sid = |
374 GetContentClient()->browser()->GetAppContainerSidForSandboxType( | 374 GetContentClient()->browser()->GetAppContainerSidForSandboxType( |
375 GetSandboxType()); | 375 GetSandboxType()); |
376 if (!sid.empty()) | 376 if (!sid.empty()) |
377 AddAppContainerPolicy(policy, sid.c_str()); | 377 AddAppContainerPolicy(policy, sid.c_str()); |
378 | 378 |
379 GetContentClient()->browser()->PreSpawnRenderer(policy, success); | 379 return GetContentClient()->browser()->PreSpawnRenderer(policy); |
380 } | 380 } |
381 | 381 |
382 #elif defined(OS_POSIX) | 382 #elif defined(OS_POSIX) |
383 bool ShouldUseZygote() override { | 383 bool ShouldUseZygote() override { |
384 const base::CommandLine& browser_command_line = | 384 const base::CommandLine& browser_command_line = |
385 *base::CommandLine::ForCurrentProcess(); | 385 *base::CommandLine::ForCurrentProcess(); |
386 base::CommandLine::StringType renderer_prefix = | 386 base::CommandLine::StringType renderer_prefix = |
387 browser_command_line.GetSwitchValueNative(switches::kRendererCmdPrefix); | 387 browser_command_line.GetSwitchValueNative(switches::kRendererCmdPrefix); |
388 return renderer_prefix.empty(); | 388 return renderer_prefix.empty(); |
389 } | 389 } |
(...skipping 2243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2633 void RenderProcessHostImpl::GetAudioOutputControllers( | 2633 void RenderProcessHostImpl::GetAudioOutputControllers( |
2634 const GetAudioOutputControllersCallback& callback) const { | 2634 const GetAudioOutputControllersCallback& callback) const { |
2635 audio_renderer_host()->GetOutputControllers(callback); | 2635 audio_renderer_host()->GetOutputControllers(callback); |
2636 } | 2636 } |
2637 | 2637 |
2638 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { | 2638 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { |
2639 return bluetooth_dispatcher_host_.get(); | 2639 return bluetooth_dispatcher_host_.get(); |
2640 } | 2640 } |
2641 | 2641 |
2642 } // namespace content | 2642 } // namespace content |
OLD | NEW |