From 236119cf32eb61f4b775ba573ecf46a1c504e7a3 Mon Sep 17 00:00:00 2001 From: "acolwell@chromium.org" Date: Fri, 16 Dec 2011 17:14:25 +0000 Subject: 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 --- media/base/mock_data_source_host.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 media/base/mock_data_source_host.h (limited to 'media/base/mock_data_source_host.h') 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 + +#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_ -- cgit v1.1