| 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/browser/browser_main_loop.h" | 5 #include "content/browser/browser_main_loop.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 #include "content/browser/gpu/compositor_util.h" | 45 #include "content/browser/gpu/compositor_util.h" |
| 46 #include "content/browser/gpu/gpu_data_manager_impl.h" | 46 #include "content/browser/gpu/gpu_data_manager_impl.h" |
| 47 #include "content/browser/gpu/gpu_process_host.h" | 47 #include "content/browser/gpu/gpu_process_host.h" |
| 48 #include "content/browser/gpu/gpu_process_host_ui_shim.h" | 48 #include "content/browser/gpu/gpu_process_host_ui_shim.h" |
| 49 #include "content/browser/histogram_synchronizer.h" | 49 #include "content/browser/histogram_synchronizer.h" |
| 50 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 50 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
| 51 #include "content/browser/media/media_internals.h" | 51 #include "content/browser/media/media_internals.h" |
| 52 #include "content/browser/mojo/mojo_shell_context.h" | 52 #include "content/browser/mojo/mojo_shell_context.h" |
| 53 #include "content/browser/net/browser_online_state_observer.h" | 53 #include "content/browser/net/browser_online_state_observer.h" |
| 54 #include "content/browser/renderer_host/media/media_stream_manager.h" | 54 #include "content/browser/renderer_host/media/media_stream_manager.h" |
| 55 #include "content/browser/renderer_host/render_process_host_impl.h" | |
| 56 #include "content/browser/speech/speech_recognition_manager_impl.h" | 55 #include "content/browser/speech/speech_recognition_manager_impl.h" |
| 57 #include "content/browser/startup_task_runner.h" | 56 #include "content/browser/startup_task_runner.h" |
| 58 #include "content/browser/time_zone_monitor.h" | 57 #include "content/browser/time_zone_monitor.h" |
| 59 #include "content/browser/utility_process_host_impl.h" | |
| 60 #include "content/browser/webui/content_web_ui_controller_factory.h" | 58 #include "content/browser/webui/content_web_ui_controller_factory.h" |
| 61 #include "content/browser/webui/url_data_manager.h" | 59 #include "content/browser/webui/url_data_manager.h" |
| 62 #include "content/common/content_switches_internal.h" | 60 #include "content/common/content_switches_internal.h" |
| 63 #include "content/common/host_discardable_shared_memory_manager.h" | 61 #include "content/common/host_discardable_shared_memory_manager.h" |
| 64 #include "content/common/host_shared_bitmap_manager.h" | 62 #include "content/common/host_shared_bitmap_manager.h" |
| 65 #include "content/common/resource_messages.h" | 63 #include "content/common/resource_messages.h" |
| 66 #include "content/public/browser/browser_main_parts.h" | 64 #include "content/public/browser/browser_main_parts.h" |
| 67 #include "content/public/browser/content_browser_client.h" | 65 #include "content/public/browser/content_browser_client.h" |
| 68 #include "content/public/browser/render_process_host.h" | 66 #include "content/public/browser/render_process_host.h" |
| 69 #include "content/public/browser/tracing_controller.h" | 67 #include "content/public/browser/tracing_controller.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 #if defined(OS_LINUX) && defined(USE_UDEV) | 146 #if defined(OS_LINUX) && defined(USE_UDEV) |
| 149 #include "content/browser/device_monitor_udev.h" | 147 #include "content/browser/device_monitor_udev.h" |
| 150 #elif defined(OS_MACOSX) && !defined(OS_IOS) | 148 #elif defined(OS_MACOSX) && !defined(OS_IOS) |
| 151 #include "content/browser/device_monitor_mac.h" | 149 #include "content/browser/device_monitor_mac.h" |
| 152 #endif | 150 #endif |
| 153 | 151 |
| 154 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 152 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 155 #include "content/browser/renderer_host/render_sandbox_host_linux.h" | 153 #include "content/browser/renderer_host/render_sandbox_host_linux.h" |
| 156 #include "content/browser/zygote_host/zygote_host_impl_linux.h" | 154 #include "content/browser/zygote_host/zygote_host_impl_linux.h" |
| 157 #include "sandbox/linux/suid/client/setuid_sandbox_host.h" | 155 #include "sandbox/linux/suid/client/setuid_sandbox_host.h" |
| 158 | |
| 159 #if !defined(OS_ANDROID) | |
| 160 #include "content/browser/ppapi_plugin_process_host.h" | |
| 161 #endif | |
| 162 #endif | 156 #endif |
| 163 | 157 |
| 164 #if defined(ENABLE_PLUGINS) | 158 #if defined(ENABLE_PLUGINS) |
| 165 #include "content/browser/plugin_service_impl.h" | 159 #include "content/browser/plugin_service_impl.h" |
| 166 #endif | 160 #endif |
| 167 | 161 |
| 168 #if defined(TCMALLOC_TRACE_MEMORY_SUPPORTED) | 162 #if defined(TCMALLOC_TRACE_MEMORY_SUPPORTED) |
| 169 #include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h" | 163 #include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h" |
| 170 #endif | 164 #endif |
| 171 | 165 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 // otherwise. | 215 // otherwise. |
| 222 LOG(FATAL) << no_suid_error; | 216 LOG(FATAL) << no_suid_error; |
| 223 } | 217 } |
| 224 } else { | 218 } else { |
| 225 LOG(ERROR) << no_suid_error; | 219 LOG(ERROR) << no_suid_error; |
| 226 } | 220 } |
| 227 | 221 |
| 228 // Tickle the sandbox host and zygote host so they fork now. | 222 // Tickle the sandbox host and zygote host so they fork now. |
| 229 RenderSandboxHostLinux::GetInstance()->Init(); | 223 RenderSandboxHostLinux::GetInstance()->Init(); |
| 230 ZygoteHostImpl::GetInstance()->Init(sandbox_binary.value()); | 224 ZygoteHostImpl::GetInstance()->Init(sandbox_binary.value()); |
| 231 RenderProcessHostImpl::EarlyZygoteLaunch(); | |
| 232 PpapiPluginProcessHost::EarlyZygoteLaunch(); | |
| 233 UtilityProcessHostImpl::EarlyZygoteLaunch(); | |
| 234 } | 225 } |
| 235 #endif | 226 #endif |
| 236 | 227 |
| 237 #if defined(USE_GLIB) | 228 #if defined(USE_GLIB) |
| 238 static void GLibLogHandler(const gchar* log_domain, | 229 static void GLibLogHandler(const gchar* log_domain, |
| 239 GLogLevelFlags log_level, | 230 GLogLevelFlags log_level, |
| 240 const gchar* message, | 231 const gchar* message, |
| 241 gpointer userdata) { | 232 gpointer userdata) { |
| 242 if (!log_domain) | 233 if (!log_domain) |
| 243 log_domain = "<unknown>"; | 234 log_domain = "<unknown>"; |
| (...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1471 DCHECK(is_tracing_startup_for_duration_); | 1462 DCHECK(is_tracing_startup_for_duration_); |
| 1472 | 1463 |
| 1473 is_tracing_startup_for_duration_ = false; | 1464 is_tracing_startup_for_duration_ = false; |
| 1474 TracingController::GetInstance()->StopTracing( | 1465 TracingController::GetInstance()->StopTracing( |
| 1475 TracingController::CreateFileSink( | 1466 TracingController::CreateFileSink( |
| 1476 startup_trace_file_, | 1467 startup_trace_file_, |
| 1477 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1468 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
| 1478 } | 1469 } |
| 1479 | 1470 |
| 1480 } // namespace content | 1471 } // namespace content |
| OLD | NEW |