OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_MOCK_READER_H_ | 5 #ifndef MEDIA_BASE_MOCK_READER_H_ |
6 #define MEDIA_BASE_MOCK_READER_H_ | 6 #define MEDIA_BASE_MOCK_READER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/callback.h" | |
12 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
13 #include "media/base/filters.h" | 12 #include "media/base/filters.h" |
14 | 13 |
15 namespace media { | 14 namespace media { |
16 | 15 |
17 // Ref counted object so we can create callbacks for asynchronous Read() | 16 // Ref counted object so we can create callbacks for asynchronous Read() |
18 // methods for any filter type. | 17 // methods for any filter type. |
19 template <class FilterType, class BufferType> | 18 template <class FilterType, class BufferType> |
20 class MockReader | 19 class MockReader |
21 : public base::RefCountedThreadSafe<MockReader<FilterType, BufferType> > { | 20 : public base::RefCountedThreadSafe<MockReader<FilterType, BufferType> > { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 68 |
70 DISALLOW_COPY_AND_ASSIGN(MockReader); | 69 DISALLOW_COPY_AND_ASSIGN(MockReader); |
71 }; | 70 }; |
72 | 71 |
73 // Commonly used reader types. | 72 // Commonly used reader types. |
74 typedef MockReader<DemuxerStream, Buffer> DemuxerStreamReader; | 73 typedef MockReader<DemuxerStream, Buffer> DemuxerStreamReader; |
75 | 74 |
76 } // namespace media | 75 } // namespace media |
77 | 76 |
78 #endif // MEDIA_BASE_MOCK_READER_H_ | 77 #endif // MEDIA_BASE_MOCK_READER_H_ |
OLD | NEW |