| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "content/public/app/content_main_runner.h" | 5 #include "content/public/app/content_main_runner.h" |
| 6 | 6 |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 | 8 |
| 9 #include "base/allocator/allocator_extension.h" | 9 #include "base/allocator/allocator_extension.h" |
| 10 #include "base/at_exit.h" | 10 #include "base/at_exit.h" |
| (...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 665 // management setup to be completed. | 665 // management setup to be completed. |
| 666 TRACE_EVENT0("startup", "ContentMainRunnerImpl::Initialize"); | 666 TRACE_EVENT0("startup", "ContentMainRunnerImpl::Initialize"); |
| 667 #endif // !OS_ANDROID | 667 #endif // !OS_ANDROID |
| 668 | 668 |
| 669 #if defined(OS_MACOSX) && !defined(OS_IOS) | 669 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 670 // We need to allocate the IO Ports before the Sandbox is initialized or | 670 // We need to allocate the IO Ports before the Sandbox is initialized or |
| 671 // the first instance of PowerMonitor is created. | 671 // the first instance of PowerMonitor is created. |
| 672 // It's important not to allocate the ports for processes which don't | 672 // It's important not to allocate the ports for processes which don't |
| 673 // register with the power monitor - see crbug.com/88867. | 673 // register with the power monitor - see crbug.com/88867. |
| 674 if (process_type.empty() || | 674 if (process_type.empty() || |
| 675 process_type == switches::kPluginProcess || | |
| 676 process_type == switches::kRendererProcess || | |
| 677 process_type == switches::kUtilityProcess || | |
| 678 process_type == switches::kWorkerProcess || | |
| 679 (delegate && | 675 (delegate && |
| 680 delegate->ProcessRegistersWithSystemProcess(process_type))) { | 676 delegate->ProcessRegistersWithSystemProcess(process_type))) { |
| 681 base::PowerMonitorDeviceSource::AllocateSystemIOPorts(); | 677 base::PowerMonitorDeviceSource::AllocateSystemIOPorts(); |
| 682 } | 678 } |
| 683 | 679 |
| 684 if (!process_type.empty() && | 680 if (!process_type.empty() && |
| 685 (!delegate || delegate->ShouldSendMachPort(process_type))) { | 681 (!delegate || delegate->ShouldSendMachPort(process_type))) { |
| 686 MachBroker::ChildSendTaskPortToParent(); | 682 MachBroker::ChildSendTaskPortToParent(); |
| 687 } | 683 } |
| 688 #elif defined(OS_WIN) | 684 #elif defined(OS_WIN) |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 839 | 835 |
| 840 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); | 836 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); |
| 841 }; | 837 }; |
| 842 | 838 |
| 843 // static | 839 // static |
| 844 ContentMainRunner* ContentMainRunner::Create() { | 840 ContentMainRunner* ContentMainRunner::Create() { |
| 845 return new ContentMainRunnerImpl(); | 841 return new ContentMainRunnerImpl(); |
| 846 } | 842 } |
| 847 | 843 |
| 848 } // namespace content | 844 } // namespace content |
| OLD | NEW |