Index: media/base/message_loop_factory_impl.h |
diff --git a/media/base/message_loop_factory_impl.h b/media/base/message_loop_factory_impl.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..000728b656af73d5e4455cc57307672e6058892d |
--- /dev/null |
+++ b/media/base/message_loop_factory_impl.h |
@@ -0,0 +1,38 @@ |
+// Copyright (c) 2011 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. |
+ |
+#ifndef MEDIA_BASE_MESSAGE_LOOP_FACTORY_IMPL_H |
+#define MEDIA_BASE_MESSAGE_LOOP_FACTORY_IMPL_H |
+ |
+#include <map> |
+#include <string> |
+ |
+#include "base/threading/thread.h" |
+#include "media/base/message_loop_factory.h" |
+ |
+namespace media { |
+ |
+class MessageLoopFactoryImpl : public MessageLoopFactory { |
+ public: |
+ MessageLoopFactoryImpl(); |
+ |
+ // MessageLoopFactory methods. |
+ virtual MessageLoop* GetMessageLoop(const std::string& name); |
+ |
+ protected: |
+ virtual ~MessageLoopFactoryImpl(); |
+ |
+ private: |
+ // Lock used to serialize access for the following data members. |
+ mutable Lock lock_; |
scherkus (not reviewing)
2011/01/13 23:52:50
nit: is mutable needed? not seeing any const meth
acolwell GONE FROM CHROMIUM
2011/01/14 01:14:12
Done.
|
+ |
+ typedef std::map<std::string, base::Thread*> ThreadMap; |
+ ThreadMap thread_map_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(MessageLoopFactoryImpl); |
+}; |
+ |
+} // namespace media |
+ |
+#endif // MEDIA_BASE_MESSAGE_LOOP_FACTORY_IMPL_H |