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

Unified Diff: media/audio/audio_thread.cc

Issue 1806313003: Pass task runners to AudioManager constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: implemented ScopedAudioManagerPtr Created 4 years, 9 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
Index: media/audio/audio_thread.cc
diff --git a/media/audio/audio_thread.cc b/media/audio/audio_thread.cc
new file mode 100644
index 0000000000000000000000000000000000000000..7c701d31bf90bae1674228e6147011c58d71b385
--- /dev/null
+++ b/media/audio/audio_thread.cc
@@ -0,0 +1,26 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "media/audio/audio_thread.h"
+
+#include "base/lazy_instance.h"
+
+static base::LazyInstance<media::AudioThread> g_thread =
+ LAZY_INSTANCE_INITIALIZER;
+
+namespace media {
+
+AudioThread::AudioThread() : thread_("Audio") {
+#if defined(OS_WIN)
+ thread_.init_com_with_mta(true);
tommi (sloooow) - chröme 2016/03/19 02:32:41 just checking - is this how things were before? u
alokp 2016/03/22 21:47:07 yes this code is moved from elsewhere. I can remov
+#endif
+ CHECK(thread_.Start());
+}
+
+// static
+base::Thread* AudioThread::Get() {
+ return &(g_thread.Get().thread_);
+}
+
+} // namespace media

Powered by Google App Engine
This is Rietveld 408576698