summaryrefslogtreecommitdiffstats
path: root/media/base/message_loop_factory.h
diff options
context:
space:
mode:
authorwjia@google.com <wjia@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-07 02:06:23 +0000
committerwjia@google.com <wjia@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-07 02:06:23 +0000
commit79ba6c7b6058c27f114fb339dec33a95e57752a5 (patch)
tree31fa4c553d8501575c1a9f8cd2fbc69794f5dfcb /media/base/message_loop_factory.h
parent68f88b99c791834d90017decb2b49f79c8905dc3 (diff)
downloadchromium_src-79ba6c7b6058c27f114fb339dec33a95e57752a5.zip
chromium_src-79ba6c7b6058c27f114fb339dec33a95e57752a5.tar.gz
chromium_src-79ba6c7b6058c27f114fb339dec33a95e57752a5.tar.bz2
add MessageLoopProxy in MessageLoopFactory
bug=None TEST=try bots Review URL: http://codereview.chromium.org/6951013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84540 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/message_loop_factory.h')
-rw-r--r--media/base/message_loop_factory.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/media/base/message_loop_factory.h b/media/base/message_loop_factory.h
index 7ed6412..35078ed 100644
--- a/media/base/message_loop_factory.h
+++ b/media/base/message_loop_factory.h
@@ -7,7 +7,9 @@
#include <string>
+#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/message_loop_proxy.h"
class MessageLoop;
@@ -23,6 +25,14 @@ class MessageLoopFactory {
// creation process.
virtual MessageLoop* GetMessageLoop(const std::string& name) = 0;
+ // Get the message loop proxy associated with |name|. A new MessageLoopProxy
+ // is created if the factory doesn't have one associated with |name|.
+ // NULL is returned if |name| is an empty string, or a new
+ // MessageLoop needs to be created and a failure occurs during the
+ // creation process.
+ virtual scoped_refptr<base::MessageLoopProxy> GetMessageLoopProxy(
+ const std::string& name) = 0;
+
protected:
// Only allow scoped_ptr<> to delete factory.
friend class scoped_ptr<MessageLoopFactory>;