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

Side by Side Diff: media/base/message_loop_factory.h

Issue 7601002: Revert r95841 due to failing media_unittests on linux_shared bot. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/base/media_switches.h ('k') | media/base/message_loop_factory_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_BASE_MESSAGE_LOOP_FACTORY_H_ 5 #ifndef MEDIA_BASE_MESSAGE_LOOP_FACTORY_H_
6 #define MEDIA_BASE_MESSAGE_LOOP_FACTORY_H_ 6 #define MEDIA_BASE_MESSAGE_LOOP_FACTORY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/message_loop_proxy.h" 12 #include "base/message_loop_proxy.h"
13 #include "media/base/media_export.h"
14 13
15 class MessageLoop; 14 class MessageLoop;
16 15
17 namespace media { 16 namespace media {
18 17
19 // Factory object that manages named MessageLoops. 18 // Factory object that manages named MessageLoops.
20 class MEDIA_EXPORT MessageLoopFactory { 19 class MessageLoopFactory {
21 public: 20 public:
22 // Get the message loop associated with |name|. A new MessageLoop 21 // Get the message loop associated with |name|. A new MessageLoop
23 // is created if the factory doesn't have one associated with |name|. 22 // is created if the factory doesn't have one associated with |name|.
24 // NULL is returned if |name| is an empty string, or a new 23 // NULL is returned if |name| is an empty string, or a new
25 // MessageLoop needs to be created and a failure occurs during the 24 // MessageLoop needs to be created and a failure occurs during the
26 // creation process. 25 // creation process.
27 virtual MessageLoop* GetMessageLoop(const std::string& name) = 0; 26 virtual MessageLoop* GetMessageLoop(const std::string& name) = 0;
28 27
29 // Get the message loop proxy associated with |name|. A new MessageLoopProxy 28 // Get the message loop proxy associated with |name|. A new MessageLoopProxy
30 // is created if the factory doesn't have one associated with |name|. 29 // is created if the factory doesn't have one associated with |name|.
31 // NULL is returned if |name| is an empty string, or a new 30 // NULL is returned if |name| is an empty string, or a new
32 // MessageLoop needs to be created and a failure occurs during the 31 // MessageLoop needs to be created and a failure occurs during the
33 // creation process. 32 // creation process.
34 virtual scoped_refptr<base::MessageLoopProxy> GetMessageLoopProxy( 33 virtual scoped_refptr<base::MessageLoopProxy> GetMessageLoopProxy(
35 const std::string& name) = 0; 34 const std::string& name) = 0;
36 35
37 protected: 36 protected:
38 // Only allow scoped_ptr<> to delete factory. 37 // Only allow scoped_ptr<> to delete factory.
39 friend class scoped_ptr<MessageLoopFactory>; 38 friend class scoped_ptr<MessageLoopFactory>;
40 virtual ~MessageLoopFactory(); 39 virtual ~MessageLoopFactory();
41 }; 40 };
42 41
43 } // namespace media 42 } // namespace media
44 43
45 #endif // MEDIA_BASE_MESSAGE_LOOP_FACTORY_H_ 44 #endif // MEDIA_BASE_MESSAGE_LOOP_FACTORY_H_
OLDNEW
« no previous file with comments | « media/base/media_switches.h ('k') | media/base/message_loop_factory_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698