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

Unified Diff: media/base/message_loop_factory.h

Issue 11468033: Vanquish the remnants of media::MessageLoopFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: media/base/message_loop_factory.h
diff --git a/media/base/message_loop_factory.h b/media/base/message_loop_factory.h
deleted file mode 100644
index f399b4804b6ceab124ed102374684a8aa873835a..0000000000000000000000000000000000000000
--- a/media/base/message_loop_factory.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 2012 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_H_
-#define MEDIA_BASE_MESSAGE_LOOP_FACTORY_H_
-
-#include <list>
-#include <string>
-
-#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/message_loop_proxy.h"
-#include "base/synchronization/lock.h"
-#include "media/base/media_export.h"
-
-class MessageLoop;
-
-namespace base {
-class Thread;
-}
-
-namespace media {
-
-// Factory object that manages named MessageLoops.
-//
-// TODO(scherkus): replace this with something simpler http://crbug.com/116873
-class MEDIA_EXPORT MessageLoopFactory {
- public:
- enum Type {
- kPipeline
- };
-
- MessageLoopFactory();
-
- // Get the message loop proxy associated with |type|. A new MessageLoopProxy
- // is created if the factory doesn't have one associated with |type|.
- scoped_refptr<base::MessageLoopProxy> GetMessageLoop(Type type);
-
- private:
- // Only allow scoped_ptr<> to delete factory.
- friend class scoped_ptr<MessageLoopFactory>;
- ~MessageLoopFactory();
-
- // Returns the thread associated with |type| creating a new thread if needed.
- base::Thread* GetThread(Type type);
-
- // Lock used to serialize access for the following data members.
- base::Lock lock_;
-
- // List of pairs of created threads and their types. We use a list to ensure
- // threads are stopped & deleted in reverse order of creation.
- typedef std::list<std::pair<Type, base::Thread*> > ThreadList;
- ThreadList threads_;
-
- DISALLOW_COPY_AND_ASSIGN(MessageLoopFactory);
-};
-
-} // namespace media
-
-#endif // MEDIA_BASE_MESSAGE_LOOP_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698