| Index: media/base/message_loop_factory_for_test.h
|
| diff --git a/media/base/message_loop_factory_for_test.h b/media/base/message_loop_factory_for_test.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..7b0a0e9a3eee4bfa3b8f99c108e5b0c360050c48
|
| --- /dev/null
|
| +++ b/media/base/message_loop_factory_for_test.h
|
| @@ -0,0 +1,29 @@
|
| +// Copyright (c) 2012 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_FOR_TEST_H_
|
| +#define MEDIA_BASE_MESSAGE_LOOP_FACTORY_FOR_TEST_H_
|
| +
|
| +#include "base/compiler_specific.h"
|
| +#include "media/base/message_loop_factory.h"
|
| +
|
| +namespace media {
|
| +
|
| +// A very basic implementation of MessageLoopFactory that supports only a single
|
| +// loop. Useful for tests that want to run video/audio decoders on the same
|
| +// thread as the test runs on.
|
| +class MessageLoopFactoryForTest : public MessageLoopFactory {
|
| + public:
|
| + explicit MessageLoopFactoryForTest(MessageLoop* the_only_loop);
|
| + virtual ~MessageLoopFactoryForTest();
|
| +
|
| + virtual MessageLoop* GetMessageLoop(const std::string& name) OVERRIDE;
|
| +
|
| + private:
|
| + MessageLoop* the_only_loop_;
|
| +};
|
| +
|
| +} // namespace media
|
| +
|
| +#endif // MEDIA_BASE_MESSAGE_LOOP_FACTORY_FOR_TEST_H_
|
|
|