Delete unused downloads page asset.
[chromium-blink-merge.git] / media / base / fake_text_track_stream.h
blobbbfbe8bc0c50a79d1996d2e9cdfe14935bf0414b
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/message_loop/message_loop.h"
6 #include "media/base/audio_decoder_config.h"
7 #include "media/base/demuxer_stream.h"
8 #include "media/base/video_decoder_config.h"
9 #include "testing/gmock/include/gmock/gmock.h"
11 namespace media {
13 // Fake implementation of the DemuxerStream. These are the stream objects
14 // we pass to the text renderer object when streams are added and removed.
15 class FakeTextTrackStream : public DemuxerStream {
16 public:
17 FakeTextTrackStream();
18 ~FakeTextTrackStream() override;
20 // DemuxerStream implementation.
21 void Read(const ReadCB&) override;
22 MOCK_METHOD0(audio_decoder_config, AudioDecoderConfig());
23 MOCK_METHOD0(video_decoder_config, VideoDecoderConfig());
24 Type type() const override;
25 MOCK_METHOD0(EnableBitstreamConverter, void());
26 bool SupportsConfigChanges() override;
27 VideoRotation video_rotation() override;
29 void SatisfyPendingRead(const base::TimeDelta& start,
30 const base::TimeDelta& duration,
31 const std::string& id,
32 const std::string& content,
33 const std::string& settings);
34 void AbortPendingRead();
35 void SendEosNotification();
37 void Stop();
39 MOCK_METHOD0(OnRead, void());
41 private:
42 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
43 ReadCB read_cb_;
44 bool stopping_;
46 DISALLOW_COPY_AND_ASSIGN(FakeTextTrackStream);
49 } // namespace media