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

Unified Diff: media/audio/audio_manager_base.h

Issue 11048029: Allow Thread to initialize COM for Windows consumers who need it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 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/audio/audio_input_volume_unittest.cc ('k') | media/audio/audio_manager_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_manager_base.h
===================================================================
--- media/audio/audio_manager_base.h (revision 163371)
+++ media/audio/audio_manager_base.h (working copy)
@@ -12,37 +12,20 @@
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "base/synchronization/lock.h"
-#include "base/threading/thread.h"
#include "media/audio/audio_manager.h"
#if defined(OS_WIN)
#include "base/win/scoped_com_initializer.h"
#endif
+namespace base {
+class Thread;
+}
+
namespace media {
class AudioOutputDispatcher;
-// Thread that enters MTA on Windows.
-#if defined(OS_WIN)
-class AudioThread : public base::Thread {
- public:
- explicit AudioThread(const char* name);
- virtual ~AudioThread();
-
- protected:
- virtual void Init() OVERRIDE;
- virtual void CleanUp() OVERRIDE;
-
- private:
- scoped_ptr<base::win::ScopedCOMInitializer> com_initializer_;
-
- DISALLOW_COPY_AND_ASSIGN(AudioThread);
-};
-#else
-typedef base::Thread AudioThread;
-#endif
-
// AudioManagerBase provides AudioManager functions common for all platforms.
class MEDIA_EXPORT AudioManagerBase : public AudioManager {
public:
@@ -129,7 +112,7 @@
// Thread used to interact with AudioOutputStreams created by this
// audio manger.
- scoped_ptr<AudioThread> audio_thread_;
+ scoped_ptr<base::Thread> audio_thread_;
mutable base::Lock audio_thread_lock_;
// Map of cached AudioOutputDispatcher instances. Must only be touched
« no previous file with comments | « media/audio/audio_input_volume_unittest.cc ('k') | media/audio/audio_manager_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698