| 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 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 614 // render process. This ensures that when a test is being run in one of the | 614 // render process. This ensures that when a test is being run in one of the |
| 615 // single process modes, the global attachment broker is the privileged | 615 // single process modes, the global attachment broker is the privileged |
| 616 // attachment broker, rather than an unprivileged attachment broker. | 616 // attachment broker, rather than an unprivileged attachment broker. |
| 617 #if defined(OS_MACOSX) && !defined(OS_IOS) | 617 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 618 IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded( | 618 IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded( |
| 619 MachBroker::GetInstance()); | 619 MachBroker::GetInstance()); |
| 620 #else | 620 #else |
| 621 IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded(); | 621 IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded(); |
| 622 #endif // defined(OS_MACOSX) && !defined(OS_IOS) | 622 #endif // defined(OS_MACOSX) && !defined(OS_IOS) |
| 623 #endif // USE_ATTACHMENT_BROKER | 623 #endif // USE_ATTACHMENT_BROKER |
| 624 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 625 mojo::edk::SetMachPortProviderIfNeeded(MachBroker::GetInstance()); |
| 626 #endif // defined(OS_MACOSX) && !defined(OS_IOS) |
| 624 } | 627 } |
| 625 | 628 |
| 626 // static | 629 // static |
| 627 void RenderProcessHostImpl::ShutDownInProcessRenderer() { | 630 void RenderProcessHostImpl::ShutDownInProcessRenderer() { |
| 628 DCHECK(g_run_renderer_in_process_); | 631 DCHECK(g_run_renderer_in_process_); |
| 629 | 632 |
| 630 switch (g_all_hosts.Pointer()->size()) { | 633 switch (g_all_hosts.Pointer()->size()) { |
| 631 case 0: | 634 case 0: |
| 632 return; | 635 return; |
| 633 case 1: { | 636 case 1: { |
| (...skipping 2185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2819 | 2822 |
| 2820 // Skip widgets in other processes. | 2823 // Skip widgets in other processes. |
| 2821 if (rvh->GetProcess()->GetID() != GetID()) | 2824 if (rvh->GetProcess()->GetID() != GetID()) |
| 2822 continue; | 2825 continue; |
| 2823 | 2826 |
| 2824 rvh->OnWebkitPreferencesChanged(); | 2827 rvh->OnWebkitPreferencesChanged(); |
| 2825 } | 2828 } |
| 2826 } | 2829 } |
| 2827 | 2830 |
| 2828 } // namespace content | 2831 } // namespace content |
| OLD | NEW |