diff options
author | acolwell@chromium.org <acolwell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-16 17:14:25 +0000 |
---|---|---|
committer | acolwell@chromium.org <acolwell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-16 17:14:25 +0000 |
commit | 236119cf32eb61f4b775ba573ecf46a1c504e7a3 (patch) | |
tree | 9a292fdefecf37aa48d448f3f7706ab5521e4d33 /media/base/mock_data_source_host.h | |
parent | 7046bfcb6c8f46d0693c129d52de27bc68042af7 (diff) | |
download | chromium_src-236119cf32eb61f4b775ba573ecf46a1c504e7a3.zip chromium_src-236119cf32eb61f4b775ba573ecf46a1c504e7a3.tar.gz chromium_src-236119cf32eb61f4b775ba573ecf46a1c504e7a3.tar.bz2 |
Removing DataSource from Filter hierarchy and refactoring FilterHost into DemuxerHost & DataSourceHost.
Over the last year, several refactorings have caused DataSource to have almost nothing in common with the Filter interface. This change removes it from the Filter class hierarchy and splits up the FilterHost interface so that DataSource, Demuxer, and Filter have their own host interfaces. Splitting FilterHost improves encapsulation and makes it easier to reason about which host methods are required by different parts of the code.
BUG=
TEST=media_unittests
Review URL: http://codereview.chromium.org/8936014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114819 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/mock_data_source_host.h')
-rw-r--r-- | media/base/mock_data_source_host.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/media/base/mock_data_source_host.h b/media/base/mock_data_source_host.h new file mode 100644 index 0000000..b569b77 --- /dev/null +++ b/media/base/mock_data_source_host.h @@ -0,0 +1,32 @@ +// Copyright (c) 2011 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_MOCK_DATA_SOURCE_HOST_H_ +#define MEDIA_BASE_MOCK_DATA_SOURCE_HOST_H_ + +#include <string> + +#include "base/memory/scoped_ptr.h" +#include "media/base/data_source.h" +#include "testing/gmock/include/gmock/gmock.h" + +namespace media { + +class MockDataSourceHost : public DataSourceHost { + public: + MockDataSourceHost(); + virtual ~MockDataSourceHost(); + + // DataSourceHost implementation. + MOCK_METHOD1(SetTotalBytes, void(int64 total_bytes)); + MOCK_METHOD1(SetBufferedBytes, void(int64 buffered_bytes)); + MOCK_METHOD1(SetNetworkActivity, void(bool network_activity)); + + private: + DISALLOW_COPY_AND_ASSIGN(MockDataSourceHost); +}; + +} // namespace media + +#endif // MEDIA_BASE_MOCK_DATA_SOURCE_HOST_H_ |