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

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

Issue 1143223007: media: Reland "Simplify {Audio|Video}Decoder initialization callback." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « media/base/mock_filters.h ('k') | media/base/test_helpers.cc » ('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) 2012 The Chromium Authors. All rights reserved. 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 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_TEST_HELPERS_H_ 5 #ifndef MEDIA_BASE_TEST_HELPERS_H_
6 #define MEDIA_BASE_TEST_HELPERS_H_ 6 #define MEDIA_BASE_TEST_HELPERS_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "media/base/channel_layout.h" 10 #include "media/base/channel_layout.h"
(...skipping 10 matching lines...) Expand all
21 class TimeDelta; 21 class TimeDelta;
22 } 22 }
23 23
24 namespace media { 24 namespace media {
25 25
26 class AudioBuffer; 26 class AudioBuffer;
27 class DecoderBuffer; 27 class DecoderBuffer;
28 28
29 // Return a callback that expects to be run once. 29 // Return a callback that expects to be run once.
30 base::Closure NewExpectedClosure(); 30 base::Closure NewExpectedClosure();
31 base::Callback<void(bool)> NewExpectedBoolCB(bool success);
31 PipelineStatusCB NewExpectedStatusCB(PipelineStatus status); 32 PipelineStatusCB NewExpectedStatusCB(PipelineStatus status);
32 33
33 // Helper class for running a message loop until a callback has run. Useful for 34 // Helper class for running a message loop until a callback has run. Useful for
34 // testing classes that run on more than a single thread. 35 // testing classes that run on more than a single thread.
35 // 36 //
36 // Events are intended for single use and cannot be reset. 37 // Events are intended for single use and cannot be reset.
37 class WaitableMessageLoopEvent { 38 class WaitableMessageLoopEvent {
38 public: 39 public:
39 WaitableMessageLoopEvent(); 40 WaitableMessageLoopEvent();
40 ~WaitableMessageLoopEvent(); 41 ~WaitableMessageLoopEvent();
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 }; 145 };
145 146
146 // Test implementation of a media log LogCB that sends media log messages to 147 // Test implementation of a media log LogCB that sends media log messages to
147 // DVLOG(1). 148 // DVLOG(1).
148 void AddLogEntryForTest(MediaLog::MediaLogLevel level, 149 void AddLogEntryForTest(MediaLog::MediaLogLevel level,
149 const std::string& message); 150 const std::string& message);
150 151
151 } // namespace media 152 } // namespace media
152 153
153 #endif // MEDIA_BASE_TEST_HELPERS_H_ 154 #endif // MEDIA_BASE_TEST_HELPERS_H_
OLDNEW
« no previous file with comments | « media/base/mock_filters.h ('k') | media/base/test_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698