| 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/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "content/browser/device_orientation/device_inertial_sensor_service.h" | 27 #include "content/browser/device_orientation/device_inertial_sensor_service.h" |
| 28 #include "content/browser/download/save_file_manager.h" | 28 #include "content/browser/download/save_file_manager.h" |
| 29 #include "content/browser/gamepad/gamepad_service.h" | 29 #include "content/browser/gamepad/gamepad_service.h" |
| 30 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" | 30 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" |
| 31 #include "content/browser/gpu/compositor_util.h" | 31 #include "content/browser/gpu/compositor_util.h" |
| 32 #include "content/browser/gpu/gpu_data_manager_impl.h" | 32 #include "content/browser/gpu/gpu_data_manager_impl.h" |
| 33 #include "content/browser/gpu/gpu_process_host.h" | 33 #include "content/browser/gpu/gpu_process_host.h" |
| 34 #include "content/browser/gpu/gpu_process_host_ui_shim.h" | 34 #include "content/browser/gpu/gpu_process_host_ui_shim.h" |
| 35 #include "content/browser/histogram_synchronizer.h" | 35 #include "content/browser/histogram_synchronizer.h" |
| 36 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 36 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
| 37 #include "content/browser/media/media_internals.h" |
| 37 #include "content/browser/net/browser_online_state_observer.h" | 38 #include "content/browser/net/browser_online_state_observer.h" |
| 38 #include "content/browser/plugin_service_impl.h" | 39 #include "content/browser/plugin_service_impl.h" |
| 39 #include "content/browser/renderer_host/media/audio_mirroring_manager.h" | 40 #include "content/browser/renderer_host/media/audio_mirroring_manager.h" |
| 40 #include "content/browser/renderer_host/media/media_stream_manager.h" | 41 #include "content/browser/renderer_host/media/media_stream_manager.h" |
| 41 #include "content/browser/speech/speech_recognition_manager_impl.h" | 42 #include "content/browser/speech/speech_recognition_manager_impl.h" |
| 42 #include "content/browser/startup_task_runner.h" | 43 #include "content/browser/startup_task_runner.h" |
| 43 #include "content/browser/tracing/trace_controller_impl.h" | 44 #include "content/browser/tracing/trace_controller_impl.h" |
| 44 #include "content/browser/webui/content_web_ui_controller_factory.h" | 45 #include "content/browser/webui/content_web_ui_controller_factory.h" |
| 45 #include "content/browser/webui/url_data_manager.h" | 46 #include "content/browser/webui/url_data_manager.h" |
| 46 #include "content/public/browser/browser_main_parts.h" | 47 #include "content/public/browser/browser_main_parts.h" |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 } | 450 } |
| 450 | 451 |
| 451 #if !defined(OS_IOS) | 452 #if !defined(OS_IOS) |
| 452 { | 453 { |
| 453 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MediaFeatures") | 454 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MediaFeatures") |
| 454 media::InitializeCPUSpecificMediaFeatures(); | 455 media::InitializeCPUSpecificMediaFeatures(); |
| 455 } | 456 } |
| 456 { | 457 { |
| 457 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:AudioMan") | 458 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:AudioMan") |
| 458 audio_manager_.reset(media::AudioManager::Create()); | 459 audio_manager_.reset(media::AudioManager::Create()); |
| 460 audio_manager_->SetMediaInternals(MediaInternals::GetInstance()); |
| 459 } | 461 } |
| 460 { | 462 { |
| 461 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MIDIManager") | 463 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MIDIManager") |
| 462 midi_manager_.reset(media::MIDIManager::Create()); | 464 midi_manager_.reset(media::MIDIManager::Create()); |
| 463 } | 465 } |
| 464 { | 466 { |
| 465 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:ContentWebUIController") | 467 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:ContentWebUIController") |
| 466 WebUIControllerFactory::RegisterFactory( | 468 WebUIControllerFactory::RegisterFactory( |
| 467 ContentWebUIControllerFactory::GetInstance()); | 469 ContentWebUIControllerFactory::GetInstance()); |
| 468 } | 470 } |
| (...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1069 if (parameters_.ui_task) | 1071 if (parameters_.ui_task) |
| 1070 base::MessageLoopForUI::current()->PostTask(FROM_HERE, | 1072 base::MessageLoopForUI::current()->PostTask(FROM_HERE, |
| 1071 *parameters_.ui_task); | 1073 *parameters_.ui_task); |
| 1072 | 1074 |
| 1073 base::RunLoop run_loop; | 1075 base::RunLoop run_loop; |
| 1074 run_loop.Run(); | 1076 run_loop.Run(); |
| 1075 #endif | 1077 #endif |
| 1076 } | 1078 } |
| 1077 | 1079 |
| 1078 } // namespace content | 1080 } // namespace content |
| OLD | NEW |