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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
650 // the first instance of PowerMonitor is created. | 650 // the first instance of PowerMonitor is created. |
651 // It's important not to allocate the ports for processes which don't | 651 // It's important not to allocate the ports for processes which don't |
652 // register with the power monitor - see crbug.com/88867. | 652 // register with the power monitor - see crbug.com/88867. |
653 if (process_type.empty() || | 653 if (process_type.empty() || |
654 process_type == switches::kPluginProcess || | 654 process_type == switches::kPluginProcess || |
655 process_type == switches::kRendererProcess || | 655 process_type == switches::kRendererProcess || |
656 process_type == switches::kUtilityProcess || | 656 process_type == switches::kUtilityProcess || |
657 process_type == switches::kWorkerProcess || | 657 process_type == switches::kWorkerProcess || |
658 (delegate && | 658 (delegate && |
659 delegate->ProcessRegistersWithSystemProcess(process_type))) { | 659 delegate->ProcessRegistersWithSystemProcess(process_type))) { |
660 base::PowerMonitor::AllocateSystemIOPorts(); | 660 base::PowerMonitorDeviceSource::AllocateSystemIOPorts(); |
661 } | 661 } |
662 | 662 |
663 if (!process_type.empty() && | 663 if (!process_type.empty() && |
664 (!delegate || delegate->ShouldSendMachPort(process_type))) { | 664 (!delegate || delegate->ShouldSendMachPort(process_type))) { |
665 MachBroker::ChildSendTaskPortToParent(); | 665 MachBroker::ChildSendTaskPortToParent(); |
666 } | 666 } |
667 #elif defined(OS_WIN) | 667 #elif defined(OS_WIN) |
668 // This must be done early enough since some helper functions like | 668 // This must be done early enough since some helper functions like |
669 // IsTouchEnabled, needed to load resources, may call into the theme dll. | 669 // IsTouchEnabled, needed to load resources, may call into the theme dll. |
670 EnableThemeSupportOnAllWindowStations(); | 670 EnableThemeSupportOnAllWindowStations(); |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 | 815 |
816 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); | 816 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); |
817 }; | 817 }; |
818 | 818 |
819 // static | 819 // static |
820 ContentMainRunner* ContentMainRunner::Create() { | 820 ContentMainRunner* ContentMainRunner::Create() { |
821 return new ContentMainRunnerImpl(); | 821 return new ContentMainRunnerImpl(); |
822 } | 822 } |
823 | 823 |
824 } // namespace content | 824 } // namespace content |
OLD | NEW |