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

Unified Diff: media/base/message_loop_factory.h

Issue 6171009: Remove MessageLoop methods from Filter interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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/base/filters.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
new file mode 100644
index 0000000000000000000000000000000000000000..02f255c81b7ff9e8b13d409007db2ef1fe8e4893
--- /dev/null
+++ b/media/base/message_loop_factory.h
@@ -0,0 +1,33 @@
+// 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_H
+#define MEDIA_BASE_MESSAGE_LOOP_FACTORY_H
+
+#include "base/ref_counted.h"
+
+class MessageLoop;
+
+namespace media {
+
+// Factory object that manages named MessageLoops.
+class MessageLoopFactory :
+ public base::RefCountedThreadSafe<MessageLoopFactory> {
scherkus (not reviewing) 2011/01/13 06:28:13 does this actually have to be ref-counted? lookin
acolwell GONE FROM CHROMIUM 2011/01/13 23:15:00 I'll remove it for now since there isn't a need ye
+ public:
+ // Get the message loop associated with |name|. A new MessageLoop
+ // is created if the factory doesn't have one associated with |name|.
+ // Null is returned if |name| is null, |name| is an empty string, or a new
+ // MessageLoop needs to be created and a failure occurs during the
+ // creation process.
+ virtual MessageLoop* GetMessageLoop(const char* name) = 0;
+
+ protected:
+ // Only allow scoped_refptr<> to delete filters.
+ friend class base::RefCountedThreadSafe<MessageLoopFactory>;
+ virtual ~MessageLoopFactory();
+};
+
+} // namespace media
+
+#endif // MEDIA_BASE_MESSAGE_LOOP_FACTORY_H
« no previous file with comments | « media/base/filters.cc ('k') | media/base/message_loop_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698