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

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: fix comment Created 7 years, 12 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 | « content/renderer/render_view_impl.cc ('k') | media/base/message_loop_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0989174e55a39f7cd783f71cc04e8d06f770d39b..0000000000000000000000000000000000000000
--- a/media/base/message_loop_factory.h
+++ /dev/null
@@ -1,62 +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:
- // Restrict who can delete the factory to scoped_ptr<>. scoped_ptr<> uses
- // base::DefaultDeleter.
- friend struct base::DefaultDeleter<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_
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | media/base/message_loop_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698