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

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

Issue 9632024: Create video and audio decoder threads on demand. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698