| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2012 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_FOR_TEST_H_ |
| 6 #define MEDIA_BASE_MESSAGE_LOOP_FACTORY_FOR_TEST_H_ |
| 7 |
| 8 #include "base/compiler_specific.h" |
| 9 #include "media/base/message_loop_factory.h" |
| 10 |
| 11 namespace media { |
| 12 |
| 13 // A very basic implementation of MessageLoopFactory that supports only a single |
| 14 // loop. Useful for tests that want to run video/audio decoders on the same |
| 15 // thread as the test runs on. |
| 16 class MessageLoopFactoryForTest : public MessageLoopFactory { |
| 17 public: |
| 18 explicit MessageLoopFactoryForTest(MessageLoop* the_only_loop); |
| 19 virtual ~MessageLoopFactoryForTest(); |
| 20 |
| 21 virtual MessageLoop* GetMessageLoop(const std::string& name) OVERRIDE; |
| 22 |
| 23 private: |
| 24 MessageLoop* the_only_loop_; |
| 25 }; |
| 26 |
| 27 } // namespace media |
| 28 |
| 29 #endif // MEDIA_BASE_MESSAGE_LOOP_FACTORY_FOR_TEST_H_ |
| OLD | NEW |