| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 #endif | 59 #endif |
| 60 | 60 |
| 61 #if defined(OS_WIN) | 61 #if defined(OS_WIN) |
| 62 #include <atlbase.h> | 62 #include <atlbase.h> |
| 63 #include <atlapp.h> | 63 #include <atlapp.h> |
| 64 #include <malloc.h> | 64 #include <malloc.h> |
| 65 #include <cstring> | 65 #include <cstring> |
| 66 #elif defined(OS_MACOSX) | 66 #elif defined(OS_MACOSX) |
| 67 #include "base/mac/scoped_nsautorelease_pool.h" | 67 #include "base/mac/scoped_nsautorelease_pool.h" |
| 68 #if !defined(OS_IOS) | 68 #if !defined(OS_IOS) |
| 69 #include "base/power_monitor/power_monitor.h" | 69 #include "base/power_monitor/power_monitor_device_source.h" |
| 70 #include "content/browser/mach_broker_mac.h" | 70 #include "content/browser/mach_broker_mac.h" |
| 71 #include "content/common/sandbox_init_mac.h" | 71 #include "content/common/sandbox_init_mac.h" |
| 72 #endif // !OS_IOS | 72 #endif // !OS_IOS |
| 73 #endif // OS_WIN | 73 #endif // OS_WIN |
| 74 | 74 |
| 75 #if defined(OS_POSIX) | 75 #if defined(OS_POSIX) |
| 76 #include <signal.h> | 76 #include <signal.h> |
| 77 | 77 |
| 78 #include "base/posix/global_descriptors.h" | 78 #include "base/posix/global_descriptors.h" |
| 79 #include "content/public/common/content_descriptors.h" | 79 #include "content/public/common/content_descriptors.h" |
| (...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 // the first instance of PowerMonitor is created. | 646 // the first instance of PowerMonitor is created. |
| 647 // It's important not to allocate the ports for processes which don't | 647 // It's important not to allocate the ports for processes which don't |
| 648 // register with the power monitor - see crbug.com/88867. | 648 // register with the power monitor - see crbug.com/88867. |
| 649 if (process_type.empty() || | 649 if (process_type.empty() || |
| 650 process_type == switches::kPluginProcess || | 650 process_type == switches::kPluginProcess || |
| 651 process_type == switches::kRendererProcess || | 651 process_type == switches::kRendererProcess || |
| 652 process_type == switches::kUtilityProcess || | 652 process_type == switches::kUtilityProcess || |
| 653 process_type == switches::kWorkerProcess || | 653 process_type == switches::kWorkerProcess || |
| 654 (delegate && | 654 (delegate && |
| 655 delegate->ProcessRegistersWithSystemProcess(process_type))) { | 655 delegate->ProcessRegistersWithSystemProcess(process_type))) { |
| 656 base::PowerMonitor::AllocateSystemIOPorts(); | 656 base::PowerMonitorDeviceSource::AllocateSystemIOPorts(); |
| 657 } | 657 } |
| 658 | 658 |
| 659 if (!process_type.empty() && | 659 if (!process_type.empty() && |
| 660 (!delegate || delegate->ShouldSendMachPort(process_type))) { | 660 (!delegate || delegate->ShouldSendMachPort(process_type))) { |
| 661 MachBroker::ChildSendTaskPortToParent(); | 661 MachBroker::ChildSendTaskPortToParent(); |
| 662 } | 662 } |
| 663 #elif defined(OS_WIN) | 663 #elif defined(OS_WIN) |
| 664 // This must be done early enough since some helper functions like | 664 // This must be done early enough since some helper functions like |
| 665 // IsTouchEnabled, needed to load resources, may call into the theme dll. | 665 // IsTouchEnabled, needed to load resources, may call into the theme dll. |
| 666 EnableThemeSupportOnAllWindowStations(); | 666 EnableThemeSupportOnAllWindowStations(); |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 812 | 812 |
| 813 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); | 813 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); |
| 814 }; | 814 }; |
| 815 | 815 |
| 816 // static | 816 // static |
| 817 ContentMainRunner* ContentMainRunner::Create() { | 817 ContentMainRunner* ContentMainRunner::Create() { |
| 818 return new ContentMainRunnerImpl(); | 818 return new ContentMainRunnerImpl(); |
| 819 } | 819 } |
| 820 | 820 |
| 821 } // namespace content | 821 } // namespace content |
| OLD | NEW |