| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| 11 #include "base/metrics/field_trial.h" | 11 #include "base/metrics/field_trial.h" |
| 12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram.h" |
| 13 #include "base/pending_task.h" | 13 #include "base/pending_task.h" |
| 14 #include "base/power_monitor/power_monitor.h" | 14 #include "base/power_monitor/power_monitor.h" |
| 15 #include "base/power_monitor/power_monitor_device_source.h" | 15 #include "base/power_monitor/power_monitor_device_source.h" |
| 16 #include "base/process/process_metrics.h" | 16 #include "base/process/process_metrics.h" |
| 17 #include "base/profiler/scoped_profile.h" | 17 #include "base/profiler/scoped_profile.h" |
| 18 #include "base/run_loop.h" | 18 #include "base/run_loop.h" |
| 19 #include "base/strings/string_number_conversions.h" | 19 #include "base/strings/string_number_conversions.h" |
| 20 #include "base/strings/string_split.h" | 20 #include "base/strings/string_split.h" |
| 21 #include "base/system_monitor/system_monitor.h" | 21 #include "base/system_monitor/system_monitor.h" |
| 22 #include "base/thread_task_runner_handle.h" | 22 #include "base/thread_task_runner_handle.h" |
| 23 #include "base/threading/thread_restrictions.h" | 23 #include "base/threading/thread_restrictions.h" |
| 24 #include "base/timer/hi_res_timer_manager.h" | 24 #include "base/timer/hi_res_timer_manager.h" |
| 25 #include "base/trace_event/memory_dump_manager.h" | 25 #include "base/trace_event/memory_dump_manager.h" |
| 26 #include "base/trace_event/trace_event.h" | 26 #include "base/trace_event/trace_event.h" |
| 27 #include "content/browser/browser_thread_impl.h" | 27 #include "content/browser/browser_thread_impl.h" |
| 28 #include "content/browser/device_sensors/device_inertial_sensor_service.h" | |
| 29 #include "content/browser/dom_storage/dom_storage_area.h" | 28 #include "content/browser/dom_storage/dom_storage_area.h" |
| 30 #include "content/browser/download/save_file_manager.h" | 29 #include "content/browser/download/save_file_manager.h" |
| 31 #include "content/browser/gamepad/gamepad_service.h" | 30 #include "content/browser/gamepad/gamepad_service.h" |
| 32 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" | 31 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" |
| 33 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" | 32 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" |
| 34 #include "content/browser/gpu/compositor_util.h" | 33 #include "content/browser/gpu/compositor_util.h" |
| 35 #include "content/browser/gpu/gpu_data_manager_impl.h" | 34 #include "content/browser/gpu/gpu_data_manager_impl.h" |
| 36 #include "content/browser/gpu/gpu_process_host.h" | 35 #include "content/browser/gpu/gpu_process_host.h" |
| 37 #include "content/browser/gpu/gpu_process_host_ui_shim.h" | 36 #include "content/browser/gpu/gpu_process_host_ui_shim.h" |
| 38 #include "content/browser/histogram_synchronizer.h" | 37 #include "content/browser/histogram_synchronizer.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 51 #include "content/public/browser/browser_main_parts.h" | 50 #include "content/public/browser/browser_main_parts.h" |
| 52 #include "content/public/browser/browser_shutdown.h" | 51 #include "content/public/browser/browser_shutdown.h" |
| 53 #include "content/public/browser/content_browser_client.h" | 52 #include "content/public/browser/content_browser_client.h" |
| 54 #include "content/public/browser/render_process_host.h" | 53 #include "content/public/browser/render_process_host.h" |
| 55 #include "content/public/browser/tracing_controller.h" | 54 #include "content/public/browser/tracing_controller.h" |
| 56 #include "content/public/common/content_switches.h" | 55 #include "content/public/common/content_switches.h" |
| 57 #include "content/public/common/main_function_params.h" | 56 #include "content/public/common/main_function_params.h" |
| 58 #include "content/public/common/result_codes.h" | 57 #include "content/public/common/result_codes.h" |
| 59 #include "crypto/nss_util.h" | 58 #include "crypto/nss_util.h" |
| 60 #include "device/battery/battery_status_service.h" | 59 #include "device/battery/battery_status_service.h" |
| 60 #include "device/device_sensors/device_inertial_sensor_service.h" |
| 61 #include "media/audio/audio_manager.h" | 61 #include "media/audio/audio_manager.h" |
| 62 #include "media/base/media.h" | 62 #include "media/base/media.h" |
| 63 #include "media/base/user_input_monitor.h" | 63 #include "media/base/user_input_monitor.h" |
| 64 #include "media/midi/midi_manager.h" | 64 #include "media/midi/midi_manager.h" |
| 65 #include "net/base/network_change_notifier.h" | 65 #include "net/base/network_change_notifier.h" |
| 66 #include "net/socket/client_socket_factory.h" | 66 #include "net/socket/client_socket_factory.h" |
| 67 #include "net/ssl/ssl_config_service.h" | 67 #include "net/ssl/ssl_config_service.h" |
| 68 #include "ui/base/clipboard/clipboard.h" | 68 #include "ui/base/clipboard/clipboard.h" |
| 69 | 69 |
| 70 #if defined(USE_AURA) || (defined(OS_MACOSX) && !defined(OS_IOS)) | 70 #if defined(USE_AURA) || (defined(OS_MACOSX) && !defined(OS_IOS)) |
| (...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1044 } | 1044 } |
| 1045 | 1045 |
| 1046 // Must happen after the I/O thread is shutdown since this class lives on the | 1046 // Must happen after the I/O thread is shutdown since this class lives on the |
| 1047 // I/O thread and isn't threadsafe. | 1047 // I/O thread and isn't threadsafe. |
| 1048 { | 1048 { |
| 1049 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:GamepadService"); | 1049 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:GamepadService"); |
| 1050 GamepadService::GetInstance()->Terminate(); | 1050 GamepadService::GetInstance()->Terminate(); |
| 1051 } | 1051 } |
| 1052 { | 1052 { |
| 1053 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:SensorService"); | 1053 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:SensorService"); |
| 1054 DeviceInertialSensorService::GetInstance()->Shutdown(); | 1054 device::DeviceInertialSensorService::GetInstance()->Shutdown(); |
| 1055 } | 1055 } |
| 1056 { | 1056 { |
| 1057 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:BatteryStatusService"); | 1057 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:BatteryStatusService"); |
| 1058 device::BatteryStatusService::GetInstance()->Shutdown(); | 1058 device::BatteryStatusService::GetInstance()->Shutdown(); |
| 1059 } | 1059 } |
| 1060 { | 1060 { |
| 1061 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:DeleteDataSources"); | 1061 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:DeleteDataSources"); |
| 1062 URLDataManager::DeleteDataSources(); | 1062 URLDataManager::DeleteDataSources(); |
| 1063 } | 1063 } |
| 1064 #endif // !defined(OS_IOS) | 1064 #endif // !defined(OS_IOS) |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1351 | 1351 |
| 1352 void BrowserMainLoop::EndStartupTracing() { | 1352 void BrowserMainLoop::EndStartupTracing() { |
| 1353 is_tracing_startup_ = false; | 1353 is_tracing_startup_ = false; |
| 1354 TracingController::GetInstance()->DisableRecording( | 1354 TracingController::GetInstance()->DisableRecording( |
| 1355 TracingController::CreateFileSink( | 1355 TracingController::CreateFileSink( |
| 1356 startup_trace_file_, | 1356 startup_trace_file_, |
| 1357 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1357 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
| 1358 } | 1358 } |
| 1359 | 1359 |
| 1360 } // namespace content | 1360 } // namespace content |
| OLD | NEW |