Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef MEDIA_BASE_MESSAGE_LOOP_FACTORY_H | |
| 6 #define MEDIA_BASE_MESSAGE_LOOP_FACTORY_H | |
| 7 | |
| 8 #include "base/ref_counted.h" | |
| 9 | |
| 10 class MessageLoop; | |
| 11 | |
| 12 namespace media { | |
| 13 | |
| 14 // Factory object that manages named MessageLoops. | |
| 15 class MessageLoopFactory : | |
| 16 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
| |
| 17 public: | |
| 18 // Get the message loop associated with |name|. A new MessageLoop | |
| 19 // is created if the factory doesn't have one associated with |name|. | |
| 20 // Null is returned if |name| is null, |name| is an empty string, or a new | |
| 21 // MessageLoop needs to be created and a failure occurs during the | |
| 22 // creation process. | |
| 23 virtual MessageLoop* GetMessageLoop(const char* name) = 0; | |
| 24 | |
| 25 protected: | |
| 26 // Only allow scoped_refptr<> to delete filters. | |
| 27 friend class base::RefCountedThreadSafe<MessageLoopFactory>; | |
| 28 virtual ~MessageLoopFactory(); | |
| 29 }; | |
| 30 | |
| 31 } // namespace media | |
| 32 | |
| 33 #endif // MEDIA_BASE_MESSAGE_LOOP_FACTORY_H | |
| OLD | NEW |