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

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

Issue 2566673002: Web MIDI: introduce MidiService class (Closed)
Patch Set: merge master 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
« no previous file with comments | « content/browser/browser_main_loop.h ('k') | content/browser/media/midi_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after
1133 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:GPUProcessHostShim"); 1133 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:GPUProcessHostShim");
1134 GpuProcessHostUIShim::DestroyAll(); 1134 GpuProcessHostUIShim::DestroyAll();
1135 } 1135 }
1136 // Cancel pending requests and prevent new requests. 1136 // Cancel pending requests and prevent new requests.
1137 if (resource_dispatcher_host_) { 1137 if (resource_dispatcher_host_) {
1138 TRACE_EVENT0("shutdown", 1138 TRACE_EVENT0("shutdown",
1139 "BrowserMainLoop::Subsystem:ResourceDispatcherHost"); 1139 "BrowserMainLoop::Subsystem:ResourceDispatcherHost");
1140 resource_dispatcher_host_->Shutdown(); 1140 resource_dispatcher_host_->Shutdown();
1141 } 1141 }
1142 // Request shutdown to clean up allocated resources on the IO thread. 1142 // Request shutdown to clean up allocated resources on the IO thread.
1143 if (midi_manager_) { 1143 if (midi_service_) {
1144 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:MidiManager"); 1144 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:MidiService");
1145 midi_manager_->Shutdown(); 1145 midi_service_->Shutdown();
1146 } 1146 }
1147 1147
1148 memory_pressure_monitor_.reset(); 1148 memory_pressure_monitor_.reset();
1149 1149
1150 #if defined(OS_MACOSX) 1150 #if defined(OS_MACOSX)
1151 BrowserCompositorMac::DisableRecyclingForShutdown(); 1151 BrowserCompositorMac::DisableRecyclingForShutdown();
1152 #endif 1152 #endif
1153 1153
1154 #if defined(USE_AURA) || defined(OS_MACOSX) 1154 #if defined(USE_AURA) || defined(OS_MACOSX)
1155 { 1155 {
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
1398 tracing::GraphicsMemoryDumpProvider::GetInstance(), "AndroidGraphics", 1398 tracing::GraphicsMemoryDumpProvider::GetInstance(), "AndroidGraphics",
1399 nullptr); 1399 nullptr);
1400 #endif 1400 #endif
1401 1401
1402 { 1402 {
1403 TRACE_EVENT0("startup", "BrowserThreadsStarted::Subsystem:AudioMan"); 1403 TRACE_EVENT0("startup", "BrowserThreadsStarted::Subsystem:AudioMan");
1404 CreateAudioManager(); 1404 CreateAudioManager();
1405 } 1405 }
1406 1406
1407 { 1407 {
1408 TRACE_EVENT0("startup", "BrowserThreadsStarted::Subsystem:MidiManager"); 1408 TRACE_EVENT0("startup", "BrowserThreadsStarted::Subsystem:MidiService");
1409 midi_manager_.reset(midi::MidiManager::Create()); 1409 midi_service_.reset(new midi::MidiService);
1410 } 1410 }
1411 1411
1412 #if defined(OS_WIN) 1412 #if defined(OS_WIN)
1413 system_message_window_.reset(new media::SystemMessageWindowWin); 1413 system_message_window_.reset(new media::SystemMessageWindowWin);
1414 #elif defined(OS_LINUX) && defined(USE_UDEV) 1414 #elif defined(OS_LINUX) && defined(USE_UDEV)
1415 device_monitor_linux_.reset( 1415 device_monitor_linux_.reset(
1416 new media::DeviceMonitorLinux(io_thread_->task_runner())); 1416 new media::DeviceMonitorLinux(io_thread_->task_runner()));
1417 #elif defined(OS_MACOSX) 1417 #elif defined(OS_MACOSX)
1418 device_monitor_mac_.reset(new media::DeviceMonitorMac()); 1418 device_monitor_mac_.reset(new media::DeviceMonitorMac());
1419 #endif 1419 #endif
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
1707 if (!audio_manager_) { 1707 if (!audio_manager_) {
1708 audio_thread_ = base::MakeUnique<AudioManagerThread>(); 1708 audio_thread_ = base::MakeUnique<AudioManagerThread>();
1709 audio_manager_ = media::AudioManager::Create( 1709 audio_manager_ = media::AudioManager::Create(
1710 audio_thread_->task_runner(), audio_thread_->worker_task_runner(), 1710 audio_thread_->task_runner(), audio_thread_->worker_task_runner(),
1711 MediaInternals::GetInstance()); 1711 MediaInternals::GetInstance());
1712 } 1712 }
1713 CHECK(audio_manager_); 1713 CHECK(audio_manager_);
1714 } 1714 }
1715 1715
1716 } // namespace content 1716 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_main_loop.h ('k') | content/browser/media/midi_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698