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

Side by Side Diff: media/base/mock_filters.cc

Issue 5744002: Refactor PipelineImpl to use CompositeFilter to manage Filter state transitions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add explicit MessageLoop usage to make sure code is running on the expected threads. Created 10 years 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
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "media/base/mock_filters.h" 5 #include "media/base/mock_filters.h"
6 6
7 namespace media { 7 namespace media {
8 8
9 void RunFilterCallback(::testing::Unused, FilterCallback* callback) { 9 void RunFilterCallback(::testing::Unused, FilterCallback* callback) {
10 callback->Run(); 10 callback->Run();
11 delete callback; 11 delete callback;
12 } 12 }
13 13
14 void DestroyFilterCallback(::testing::Unused, FilterCallback* callback) { 14 void DestroyFilterCallback(::testing::Unused, FilterCallback* callback) {
15 delete callback; 15 delete callback;
16 } 16 }
17 17
18 void RunStopFilterCallback(FilterCallback* callback) { 18 void RunStopFilterCallback(FilterCallback* callback) {
19 callback->Run(); 19 callback->Run();
20 delete callback; 20 delete callback;
21 } 21 }
22 22
23 MockFilter::MockFilter() :
24 requires_message_loop_(false),
25 message_loop_name_("MockFilter")
26 {}
scherkus (not reviewing) 2010/12/15 16:44:02 pedantic style nit: I *think* when we have an empt
acolwell GONE FROM CHROMIUM 2010/12/15 18:20:11 Done.
27
28 MockFilter::~MockFilter()
29 {}
30
31 void MockFilter::set_requires_message_loop(bool requires_message_loop) {
32 requires_message_loop_ = requires_message_loop;
33 }
34
35 void MockFilter::set_message_loop_name(const char* name) {
36 message_loop_name_ = name;
37 }
38
39 bool MockFilter::requires_message_loop() const {
40 return requires_message_loop_;
41 }
42
43 const char* MockFilter::message_loop_name() const {
44 return message_loop_name_.c_str();
45 }
46
47
23 } // namespace media 48 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698