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

Unified Diff: media/midi/midi_service.cc

Issue 2686043003: [not for review] Web MIDI: new backend to support dynamic instantiation on Windows (Closed)
Patch Set: not for review (rebase/rename/LazyInstance) Created 3 years, 10 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/midi/midi_service.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/midi/midi_service.cc
diff --git a/media/midi/midi_service.cc b/media/midi/midi_service.cc
index 430aaa8129cad877318926c6ef64d68f7251819a..722976263b667d8d856e2b1a9c5bd2dd83f7383d 100644
--- a/media/midi/midi_service.cc
+++ b/media/midi/midi_service.cc
@@ -16,7 +16,7 @@ namespace {
bool IsDynamicInstantiationEnabled() {
// TODO(toyoshim): Support on all platforms. See https://crbug.com/672793.
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_WIN)
return base::FeatureList::IsEnabled(
features::kMidiManagerDynamicInstantiation);
#else
@@ -99,6 +99,9 @@ scoped_refptr<base::SingleThreadTaskRunner> MidiService::GetTaskRunner(
if (!threads_[runner_id].get()) {
threads_[runner_id] = base::MakeUnique<base::Thread>(
base::StringPrintf("MidiServiceThread(%zu)", runner_id));
+#if defined(OS_WIN)
+ threads_[runner_id]->init_com_with_mta(true);
+#endif
threads_[runner_id]->Start();
}
return threads_[runner_id]->task_runner();
« no previous file with comments | « media/midi/midi_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698