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 <stddef.h> | 5 #include <stddef.h> |
6 #include <utility> | 6 #include <utility> |
7 | 7 |
8 #include "base/base_switches.h" | 8 #include "base/base_switches.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/debugger.h" | 10 #include "base/debug/debugger.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "build/build_config.h" | 23 #include "build/build_config.h" |
24 #include "content/child/child_process.h" | 24 #include "content/child/child_process.h" |
25 #include "content/common/content_constants_internal.h" | 25 #include "content/common/content_constants_internal.h" |
26 #include "content/common/service_manager/service_manager_connection_impl.h" | 26 #include "content/common/service_manager/service_manager_connection_impl.h" |
27 #include "content/public/common/content_switches.h" | 27 #include "content/public/common/content_switches.h" |
28 #include "content/public/common/main_function_params.h" | 28 #include "content/public/common/main_function_params.h" |
29 #include "content/public/renderer/content_renderer_client.h" | 29 #include "content/public/renderer/content_renderer_client.h" |
30 #include "content/renderer/render_process_impl.h" | 30 #include "content/renderer/render_process_impl.h" |
31 #include "content/renderer/render_thread_impl.h" | 31 #include "content/renderer/render_thread_impl.h" |
32 #include "content/renderer/renderer_main_platform_delegate.h" | 32 #include "content/renderer/renderer_main_platform_delegate.h" |
| 33 #include "ppapi/features/features.h" |
33 #include "third_party/WebKit/public/platform/scheduler/renderer/renderer_schedul
er.h" | 34 #include "third_party/WebKit/public/platform/scheduler/renderer/renderer_schedul
er.h" |
34 #include "third_party/skia/include/core/SkGraphics.h" | 35 #include "third_party/skia/include/core/SkGraphics.h" |
35 #include "ui/base/ui_base_switches.h" | 36 #include "ui/base/ui_base_switches.h" |
36 | 37 |
37 #if defined(OS_ANDROID) | 38 #if defined(OS_ANDROID) |
38 #include "base/android/library_loader/library_loader_hooks.h" | 39 #include "base/android/library_loader/library_loader_hooks.h" |
39 #endif // OS_ANDROID | 40 #endif // OS_ANDROID |
40 | 41 |
41 #if defined(OS_MACOSX) | 42 #if defined(OS_MACOSX) |
42 #include <Carbon/Carbon.h> | 43 #include <Carbon/Carbon.h> |
43 #include <signal.h> | 44 #include <signal.h> |
44 #include <unistd.h> | 45 #include <unistd.h> |
45 | 46 |
46 #include "base/mac/scoped_nsautorelease_pool.h" | 47 #include "base/mac/scoped_nsautorelease_pool.h" |
47 #include "base/message_loop/message_pump_mac.h" | 48 #include "base/message_loop/message_pump_mac.h" |
48 #include "third_party/WebKit/public/web/WebView.h" | 49 #include "third_party/WebKit/public/web/WebView.h" |
49 #endif // OS_MACOSX | 50 #endif // OS_MACOSX |
50 | 51 |
51 #if defined(ENABLE_PLUGINS) | 52 #if BUILDFLAG(ENABLE_PLUGINS) |
52 #include "content/renderer/pepper/pepper_plugin_registry.h" | 53 #include "content/renderer/pepper/pepper_plugin_registry.h" |
53 #endif | 54 #endif |
54 | 55 |
55 #if defined(ENABLE_WEBRTC) | 56 #if defined(ENABLE_WEBRTC) |
56 #include "third_party/webrtc_overrides/init_webrtc.h" | 57 #include "third_party/webrtc_overrides/init_webrtc.h" |
57 #endif | 58 #endif |
58 | 59 |
59 #if defined(USE_OZONE) | 60 #if defined(USE_OZONE) |
60 #include "ui/ozone/public/client_native_pixmap_factory.h" | 61 #include "ui/ozone/public/client_native_pixmap_factory.h" |
61 #endif | 62 #endif |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 // If we have any pending LibraryLoader histograms, record them. | 152 // If we have any pending LibraryLoader histograms, record them. |
152 base::android::RecordLibraryLoaderRendererHistograms(); | 153 base::android::RecordLibraryLoaderRendererHistograms(); |
153 #endif | 154 #endif |
154 | 155 |
155 std::unique_ptr<blink::scheduler::RendererScheduler> renderer_scheduler( | 156 std::unique_ptr<blink::scheduler::RendererScheduler> renderer_scheduler( |
156 blink::scheduler::RendererScheduler::Create()); | 157 blink::scheduler::RendererScheduler::Create()); |
157 | 158 |
158 // PlatformInitialize uses FieldTrials, so this must happen later. | 159 // PlatformInitialize uses FieldTrials, so this must happen later. |
159 platform.PlatformInitialize(); | 160 platform.PlatformInitialize(); |
160 | 161 |
161 #if defined(ENABLE_PLUGINS) | 162 #if BUILDFLAG(ENABLE_PLUGINS) |
162 // Load pepper plugins before engaging the sandbox. | 163 // Load pepper plugins before engaging the sandbox. |
163 PepperPluginRegistry::GetInstance(); | 164 PepperPluginRegistry::GetInstance(); |
164 #endif | 165 #endif |
165 #if defined(ENABLE_WEBRTC) | 166 #if defined(ENABLE_WEBRTC) |
166 // Initialize WebRTC before engaging the sandbox. | 167 // Initialize WebRTC before engaging the sandbox. |
167 // NOTE: On linux, this call could already have been made from | 168 // NOTE: On linux, this call could already have been made from |
168 // zygote_main_linux.cc. However, calling multiple times from the same thread | 169 // zygote_main_linux.cc. However, calling multiple times from the same thread |
169 // is OK. | 170 // is OK. |
170 InitializeWebRtcModule(); | 171 InitializeWebRtcModule(); |
171 #endif | 172 #endif |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 // ignore shutdown-only leaks. | 205 // ignore shutdown-only leaks. |
205 __lsan_do_leak_check(); | 206 __lsan_do_leak_check(); |
206 #endif | 207 #endif |
207 } | 208 } |
208 platform.PlatformUninitialize(); | 209 platform.PlatformUninitialize(); |
209 TRACE_EVENT_ASYNC_END0("startup", "RendererMain", 0); | 210 TRACE_EVENT_ASYNC_END0("startup", "RendererMain", 0); |
210 return 0; | 211 return 0; |
211 } | 212 } |
212 | 213 |
213 } // namespace content | 214 } // namespace content |
OLD | NEW |