| 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 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 // render process. This ensures that when a test is being run in one of the | 594 // render process. This ensures that when a test is being run in one of the |
| 595 // single process modes, the global attachment broker is the privileged | 595 // single process modes, the global attachment broker is the privileged |
| 596 // attachment broker, rather than an unprivileged attachment broker. | 596 // attachment broker, rather than an unprivileged attachment broker. |
| 597 #if defined(OS_MACOSX) | 597 #if defined(OS_MACOSX) |
| 598 IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded( | 598 IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded( |
| 599 MachBroker::GetInstance()); | 599 MachBroker::GetInstance()); |
| 600 #else | 600 #else |
| 601 IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded(); | 601 IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded(); |
| 602 #endif // defined(OS_MACOSX) | 602 #endif // defined(OS_MACOSX) |
| 603 #endif // USE_ATTACHMENT_BROKER | 603 #endif // USE_ATTACHMENT_BROKER |
| 604 BrowserMainLoop::GetInstance()->InitializeMediaComponentsIfNeeded(); |
| 604 } | 605 } |
| 605 | 606 |
| 606 // static | 607 // static |
| 607 void RenderProcessHostImpl::ShutDownInProcessRenderer() { | 608 void RenderProcessHostImpl::ShutDownInProcessRenderer() { |
| 608 DCHECK(g_run_renderer_in_process_); | 609 DCHECK(g_run_renderer_in_process_); |
| 609 | 610 |
| 610 switch (g_all_hosts.Pointer()->size()) { | 611 switch (g_all_hosts.Pointer()->size()) { |
| 611 case 0: | 612 case 0: |
| 612 return; | 613 return; |
| 613 case 1: { | 614 case 1: { |
| (...skipping 2197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2811 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 2812 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
| 2812 | 2813 |
| 2813 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias | 2814 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias |
| 2814 // enough information here so that we can determine what the bad message was. | 2815 // enough information here so that we can determine what the bad message was. |
| 2815 base::debug::Alias(&error); | 2816 base::debug::Alias(&error); |
| 2816 bad_message::ReceivedBadMessage(process.get(), | 2817 bad_message::ReceivedBadMessage(process.get(), |
| 2817 bad_message::RPH_MOJO_PROCESS_ERROR); | 2818 bad_message::RPH_MOJO_PROCESS_ERROR); |
| 2818 } | 2819 } |
| 2819 | 2820 |
| 2820 } // namespace content | 2821 } // namespace content |
| OLD | NEW |