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" |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:NetworkChangeNotifier"); | 509 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:NetworkChangeNotifier"); |
510 network_change_notifier_.reset(net::NetworkChangeNotifier::Create()); | 510 network_change_notifier_.reset(net::NetworkChangeNotifier::Create()); |
511 } | 511 } |
512 | 512 |
513 #if !defined(OS_IOS) | 513 #if !defined(OS_IOS) |
514 { | 514 { |
515 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MediaFeatures"); | 515 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MediaFeatures"); |
516 media::InitializeCPUSpecificMediaFeatures(); | 516 media::InitializeCPUSpecificMediaFeatures(); |
517 } | 517 } |
518 { | 518 { |
519 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:AudioMan"); | |
520 audio_manager_.reset(media::AudioManager::Create( | |
521 MediaInternals::GetInstance())); | |
522 } | |
523 { | |
524 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MidiManager"); | |
525 midi_manager_.reset(media::MidiManager::Create()); | |
526 } | |
527 { | |
528 TRACE_EVENT0("startup", | 519 TRACE_EVENT0("startup", |
529 "BrowserMainLoop::Subsystem:ContentWebUIController"); | 520 "BrowserMainLoop::Subsystem:ContentWebUIController"); |
530 WebUIControllerFactory::RegisterFactory( | 521 WebUIControllerFactory::RegisterFactory( |
531 ContentWebUIControllerFactory::GetInstance()); | 522 ContentWebUIControllerFactory::GetInstance()); |
532 } | 523 } |
533 | 524 |
534 { | 525 { |
535 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:OnlineStateObserver"); | 526 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:OnlineStateObserver"); |
536 online_state_observer_.reset(new BrowserOnlineStateObserver); | 527 online_state_observer_.reset(new BrowserOnlineStateObserver); |
537 } | 528 } |
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1078 if (aura::Env::GetInstance()) { | 1069 if (aura::Env::GetInstance()) { |
1079 aura::Env::GetInstance()->set_context_factory(GetContextFactory()); | 1070 aura::Env::GetInstance()->set_context_factory(GetContextFactory()); |
1080 } | 1071 } |
1081 #endif | 1072 #endif |
1082 #elif defined(OS_ANDROID) | 1073 #elif defined(OS_ANDROID) |
1083 // TODO(crbug.com/439322): This should be set to |true|. | 1074 // TODO(crbug.com/439322): This should be set to |true|. |
1084 established_gpu_channel = false; | 1075 established_gpu_channel = false; |
1085 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel); | 1076 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel); |
1086 #endif | 1077 #endif |
1087 | 1078 |
| 1079 { |
| 1080 TRACE_EVENT0("startup", "BrowserThreadsStarted::Subsystem:AudioMan"); |
| 1081 audio_manager_.reset(media::AudioManager::CreateWithHangTimer( |
| 1082 MediaInternals::GetInstance(), io_thread_->task_runner())); |
| 1083 } |
| 1084 |
| 1085 { |
| 1086 TRACE_EVENT0("startup", "BrowserThreadsStarted::Subsystem:MidiManager"); |
| 1087 midi_manager_.reset(media::MidiManager::Create()); |
| 1088 } |
| 1089 |
1088 #if defined(OS_LINUX) && defined(USE_UDEV) | 1090 #if defined(OS_LINUX) && defined(USE_UDEV) |
1089 device_monitor_linux_.reset(new DeviceMonitorLinux()); | 1091 device_monitor_linux_.reset(new DeviceMonitorLinux()); |
1090 #elif defined(OS_MACOSX) | 1092 #elif defined(OS_MACOSX) |
1091 device_monitor_mac_.reset(new DeviceMonitorMac()); | 1093 device_monitor_mac_.reset(new DeviceMonitorMac()); |
1092 #endif | 1094 #endif |
1093 | 1095 |
1094 #if defined(OS_WIN) | 1096 #if defined(OS_WIN) |
1095 UMA_HISTOGRAM_BOOLEAN("Windows.Win32kRendererLockdown", | 1097 UMA_HISTOGRAM_BOOLEAN("Windows.Win32kRendererLockdown", |
1096 IsWin32kRendererLockdownEnabled()); | 1098 IsWin32kRendererLockdownEnabled()); |
1097 #endif | 1099 #endif |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1274 | 1276 |
1275 void BrowserMainLoop::EndStartupTracing() { | 1277 void BrowserMainLoop::EndStartupTracing() { |
1276 is_tracing_startup_ = false; | 1278 is_tracing_startup_ = false; |
1277 TracingController::GetInstance()->DisableRecording( | 1279 TracingController::GetInstance()->DisableRecording( |
1278 TracingController::CreateFileSink( | 1280 TracingController::CreateFileSink( |
1279 startup_trace_file_, | 1281 startup_trace_file_, |
1280 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1282 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
1281 } | 1283 } |
1282 | 1284 |
1283 } // namespace content | 1285 } // namespace content |
OLD | NEW |