Add details (where missing) for histograms and remove a few that are not worth provid...
[chromium-blink-merge.git] / media / base / fake_text_track_stream.h
blobdb7a3e10df6f3cea5a642757fadd55c9c02f3ca5
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 virtual ~FakeTextTrackStream();
20 // DemuxerStream implementation.
21 virtual void Read(const ReadCB&) OVERRIDE;
22 MOCK_METHOD0(audio_decoder_config, AudioDecoderConfig());
23 MOCK_METHOD0(video_decoder_config, VideoDecoderConfig());
24 virtual Type type() OVERRIDE;
25 MOCK_METHOD0(EnableBitstreamConverter, void());
26 virtual bool SupportsConfigChanges();
28 void SatisfyPendingRead(const base::TimeDelta& start,
29 const base::TimeDelta& duration,
30 const std::string& id,
31 const std::string& content,
32 const std::string& settings);
33 void AbortPendingRead();
34 void SendEosNotification();
36 void Stop();
38 MOCK_METHOD0(OnRead, void());
40 private:
41 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
42 ReadCB read_cb_;
43 bool stopping_;
45 DISALLOW_COPY_AND_ASSIGN(FakeTextTrackStream);
48 } // namespace media