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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 #endif | 61 #endif |
62 | 62 |
63 #if defined(OS_WIN) | 63 #if defined(OS_WIN) |
64 #include <atlbase.h> | 64 #include <atlbase.h> |
65 #include <atlapp.h> | 65 #include <atlapp.h> |
66 #include <malloc.h> | 66 #include <malloc.h> |
67 #include <cstring> | 67 #include <cstring> |
68 #elif defined(OS_MACOSX) | 68 #elif defined(OS_MACOSX) |
69 #include "base/mac/scoped_nsautorelease_pool.h" | 69 #include "base/mac/scoped_nsautorelease_pool.h" |
70 #if !defined(OS_IOS) | 70 #if !defined(OS_IOS) |
71 #include "base/power_monitor/power_monitor.h" | 71 #include "base/power_monitor/power_monitor_device_source.h" |
72 #include "content/browser/mach_broker_mac.h" | 72 #include "content/browser/mach_broker_mac.h" |
73 #include "content/common/sandbox_init_mac.h" | 73 #include "content/common/sandbox_init_mac.h" |
74 #endif // !OS_IOS | 74 #endif // !OS_IOS |
75 #endif // OS_WIN | 75 #endif // OS_WIN |
76 | 76 |
77 #if defined(OS_POSIX) | 77 #if defined(OS_POSIX) |
78 #include <signal.h> | 78 #include <signal.h> |
79 | 79 |
80 #include "base/posix/global_descriptors.h" | 80 #include "base/posix/global_descriptors.h" |
81 #include "content/public/common/content_descriptors.h" | 81 #include "content/public/common/content_descriptors.h" |
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
658 // the first instance of PowerMonitor is created. | 658 // the first instance of PowerMonitor is created. |
659 // It's important not to allocate the ports for processes which don't | 659 // It's important not to allocate the ports for processes which don't |
660 // register with the power monitor - see crbug.com/88867. | 660 // register with the power monitor - see crbug.com/88867. |
661 if (process_type.empty() || | 661 if (process_type.empty() || |
662 process_type == switches::kPluginProcess || | 662 process_type == switches::kPluginProcess || |
663 process_type == switches::kRendererProcess || | 663 process_type == switches::kRendererProcess || |
664 process_type == switches::kUtilityProcess || | 664 process_type == switches::kUtilityProcess || |
665 process_type == switches::kWorkerProcess || | 665 process_type == switches::kWorkerProcess || |
666 (delegate && | 666 (delegate && |
667 delegate->ProcessRegistersWithSystemProcess(process_type))) { | 667 delegate->ProcessRegistersWithSystemProcess(process_type))) { |
668 base::PowerMonitor::AllocateSystemIOPorts(); | 668 base::PowerMonitorDeviceSource::AllocateSystemIOPorts(); |
669 } | 669 } |
670 | 670 |
671 if (!process_type.empty() && | 671 if (!process_type.empty() && |
672 (!delegate || delegate->ShouldSendMachPort(process_type))) { | 672 (!delegate || delegate->ShouldSendMachPort(process_type))) { |
673 MachBroker::ChildSendTaskPortToParent(); | 673 MachBroker::ChildSendTaskPortToParent(); |
674 } | 674 } |
675 #elif defined(OS_WIN) | 675 #elif defined(OS_WIN) |
676 // This must be done early enough since some helper functions like | 676 // This must be done early enough since some helper functions like |
677 // IsTouchEnabled, needed to load resources, may call into the theme dll. | 677 // IsTouchEnabled, needed to load resources, may call into the theme dll. |
678 EnableThemeSupportOnAllWindowStations(); | 678 EnableThemeSupportOnAllWindowStations(); |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
823 | 823 |
824 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); | 824 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); |
825 }; | 825 }; |
826 | 826 |
827 // static | 827 // static |
828 ContentMainRunner* ContentMainRunner::Create() { | 828 ContentMainRunner* ContentMainRunner::Create() { |
829 return new ContentMainRunnerImpl(); | 829 return new ContentMainRunnerImpl(); |
830 } | 830 } |
831 | 831 |
832 } // namespace content | 832 } // namespace content |
OLD | NEW |