Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 2566673002: Web MIDI: introduce MidiService class (Closed)
Patch Set: review #16 Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 #include "content/public/common/content_client.h" 86 #include "content/public/common/content_client.h"
87 #include "content/public/common/content_features.h" 87 #include "content/public/common/content_features.h"
88 #include "content/public/common/content_switches.h" 88 #include "content/public/common/content_switches.h"
89 #include "content/public/common/main_function_params.h" 89 #include "content/public/common/main_function_params.h"
90 #include "content/public/common/result_codes.h" 90 #include "content/public/common/result_codes.h"
91 #include "device/battery/battery_status_service.h" 91 #include "device/battery/battery_status_service.h"
92 #include "device/gamepad/gamepad_service.h" 92 #include "device/gamepad/gamepad_service.h"
93 #include "device/time_zone_monitor/time_zone_monitor.h" 93 #include "device/time_zone_monitor/time_zone_monitor.h"
94 #include "media/base/media.h" 94 #include "media/base/media.h"
95 #include "media/base/user_input_monitor.h" 95 #include "media/base/user_input_monitor.h"
96 #include "media/midi/midi_manager.h" 96 #include "media/midi/midi_service.h"
97 #include "mojo/edk/embedder/embedder.h" 97 #include "mojo/edk/embedder/embedder.h"
98 #include "mojo/edk/embedder/scoped_ipc_support.h" 98 #include "mojo/edk/embedder/scoped_ipc_support.h"
99 #include "net/base/network_change_notifier.h" 99 #include "net/base/network_change_notifier.h"
100 #include "net/socket/client_socket_factory.h" 100 #include "net/socket/client_socket_factory.h"
101 #include "net/ssl/ssl_config_service.h" 101 #include "net/ssl/ssl_config_service.h"
102 #include "ppapi/features/features.h" 102 #include "ppapi/features/features.h"
103 #include "services/service_manager/runner/common/client_util.h" 103 #include "services/service_manager/runner/common/client_util.h"
104 #include "skia/ext/event_tracer_impl.h" 104 #include "skia/ext/event_tracer_impl.h"
105 #include "skia/ext/skia_memory_dump_provider.h" 105 #include "skia/ext/skia_memory_dump_provider.h"
106 #include "sql/sql_memory_dump_provider.h" 106 #include "sql/sql_memory_dump_provider.h"
(...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:GPUProcessHostShim"); 1130 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:GPUProcessHostShim");
1131 GpuProcessHostUIShim::DestroyAll(); 1131 GpuProcessHostUIShim::DestroyAll();
1132 } 1132 }
1133 // Cancel pending requests and prevent new requests. 1133 // Cancel pending requests and prevent new requests.
1134 if (resource_dispatcher_host_) { 1134 if (resource_dispatcher_host_) {
1135 TRACE_EVENT0("shutdown", 1135 TRACE_EVENT0("shutdown",
1136 "BrowserMainLoop::Subsystem:ResourceDispatcherHost"); 1136 "BrowserMainLoop::Subsystem:ResourceDispatcherHost");
1137 resource_dispatcher_host_->Shutdown(); 1137 resource_dispatcher_host_->Shutdown();
1138 } 1138 }
1139 // Request shutdown to clean up allocated resources on the IO thread. 1139 // Request shutdown to clean up allocated resources on the IO thread.
1140 if (midi_manager_) { 1140 if (midi_service_) {
1141 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:MidiManager"); 1141 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:MidiService");
1142 midi_manager_->Shutdown(); 1142 midi_service_->Shutdown();
1143 } 1143 }
1144 1144
1145 memory_pressure_monitor_.reset(); 1145 memory_pressure_monitor_.reset();
1146 1146
1147 #if defined(OS_MACOSX) 1147 #if defined(OS_MACOSX)
1148 BrowserCompositorMac::DisableRecyclingForShutdown(); 1148 BrowserCompositorMac::DisableRecyclingForShutdown();
1149 #endif 1149 #endif
1150 1150
1151 #if defined(USE_AURA) || defined(OS_MACOSX) 1151 #if defined(USE_AURA) || defined(OS_MACOSX)
1152 { 1152 {
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
1393 tracing::GraphicsMemoryDumpProvider::GetInstance(), "AndroidGraphics", 1393 tracing::GraphicsMemoryDumpProvider::GetInstance(), "AndroidGraphics",
1394 nullptr); 1394 nullptr);
1395 #endif 1395 #endif
1396 1396
1397 { 1397 {
1398 TRACE_EVENT0("startup", "BrowserThreadsStarted::Subsystem:AudioMan"); 1398 TRACE_EVENT0("startup", "BrowserThreadsStarted::Subsystem:AudioMan");
1399 CreateAudioManager(); 1399 CreateAudioManager();
1400 } 1400 }
1401 1401
1402 { 1402 {
1403 TRACE_EVENT0("startup", "BrowserThreadsStarted::Subsystem:MidiManager"); 1403 TRACE_EVENT0("startup", "BrowserThreadsStarted::Subsystem:MidiService");
1404 midi_manager_.reset(midi::MidiManager::Create()); 1404 midi_service_.reset(new midi::MidiService);
1405 } 1405 }
1406 1406
1407 #if defined(OS_WIN) 1407 #if defined(OS_WIN)
1408 system_message_window_.reset(new media::SystemMessageWindowWin); 1408 system_message_window_.reset(new media::SystemMessageWindowWin);
1409 #elif defined(OS_LINUX) && defined(USE_UDEV) 1409 #elif defined(OS_LINUX) && defined(USE_UDEV)
1410 device_monitor_linux_.reset( 1410 device_monitor_linux_.reset(
1411 new media::DeviceMonitorLinux(io_thread_->task_runner())); 1411 new media::DeviceMonitorLinux(io_thread_->task_runner()));
1412 #elif defined(OS_MACOSX) 1412 #elif defined(OS_MACOSX)
1413 device_monitor_mac_.reset(new media::DeviceMonitorMac()); 1413 device_monitor_mac_.reset(new media::DeviceMonitorMac());
1414 #endif 1414 #endif
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
1701 if (!audio_manager_) { 1701 if (!audio_manager_) {
1702 audio_thread_ = base::MakeUnique<AudioDeviceThread>(); 1702 audio_thread_ = base::MakeUnique<AudioDeviceThread>();
1703 audio_manager_ = media::AudioManager::Create( 1703 audio_manager_ = media::AudioManager::Create(
1704 audio_thread_->GetTaskRunner(), audio_thread_->worker_task_runner(), 1704 audio_thread_->GetTaskRunner(), audio_thread_->worker_task_runner(),
1705 MediaInternals::GetInstance()); 1705 MediaInternals::GetInstance());
1706 } 1706 }
1707 CHECK(audio_manager_); 1707 CHECK(audio_manager_);
1708 } 1708 }
1709 1709
1710 } // namespace content 1710 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698