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

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: Apply CR suggestions & fix style issues. 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
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..efbbf7b251fccc82d968adda95e1817733096187
--- /dev/null
+++ b/media/base/message_loop_factory.h
@@ -0,0 +1,34 @@
+// 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
scherkus (not reviewing) 2011/01/13 23:52:50 nit: header guards end with trailing _
acolwell GONE FROM CHROMIUM 2011/01/14 01:14:12 Done.
+#define MEDIA_BASE_MESSAGE_LOOP_FACTORY_H
+
+#include <string>
+
+#include "base/scoped_ptr.h"
+
+class MessageLoop;
+
+namespace media {
+
+// Factory object that manages named MessageLoops.
+class MessageLoopFactory {
+ 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
scherkus (not reviewing) 2011/01/13 23:52:50 Null -> NULL also |name| can no longer be NULL
acolwell GONE FROM CHROMIUM 2011/01/14 01:14:12 Done.
+ // MessageLoop needs to be created and a failure occurs during the
+ // creation process.
+ virtual MessageLoop* GetMessageLoop(const std::string& name) = 0;
+
+ protected:
+ // Only allow scoped_ptr<> to delete factory.
+ friend class scoped_ptr<MessageLoopFactory>;
+ virtual ~MessageLoopFactory();
+};
+
+} // namespace media
+
+#endif // MEDIA_BASE_MESSAGE_LOOP_FACTORY_H

Powered by Google App Engine
This is Rietveld 408576698