Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Side by Side Diff: media/cast/test/loopback_transport.h

Issue 1515023002: Simplify interface for media/cast: CastTransportSenderImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/cast/test/end2end_unittest.cc ('k') | media/cast/test/sender.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_CAST_TEST_LOOPBACK_TRANSPORT_H_ 5 #ifndef MEDIA_CAST_TEST_LOOPBACK_TRANSPORT_H_
6 #define MEDIA_CAST_TEST_LOOPBACK_TRANSPORT_H_ 6 #define MEDIA_CAST_TEST_LOOPBACK_TRANSPORT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 18 matching lines...) Expand all
29 class LoopBackTransport : public PacketSender { 29 class LoopBackTransport : public PacketSender {
30 public: 30 public:
31 explicit LoopBackTransport( 31 explicit LoopBackTransport(
32 scoped_refptr<CastEnvironment> cast_environment); 32 scoped_refptr<CastEnvironment> cast_environment);
33 ~LoopBackTransport() final; 33 ~LoopBackTransport() final;
34 34
35 bool SendPacket(PacketRef packet, const base::Closure& cb) final; 35 bool SendPacket(PacketRef packet, const base::Closure& cb) final;
36 36
37 int64_t GetBytesSent() final; 37 int64_t GetBytesSent() final;
38 38
39 void StartReceiving(
40 const PacketReceiverCallbackWithStatus& packet_receiver) final {}
41
42 void StopReceiving() final {}
43
39 // Initiailize this loopback transport. 44 // Initiailize this loopback transport.
40 // Establish a flow of packets from |pipe| to |packet_receiver|. 45 // Establish a flow of packets from |pipe| to |packet_receiver|.
41 // 46 //
42 // The data flow looks like: 47 // The data flow looks like:
43 // SendPacket() -> |pipe| -> Fake loopback pipe -> |packet_receiver|. 48 // SendPacket() -> |pipe| -> Fake loopback pipe -> |packet_receiver|.
44 // 49 //
45 // If |pipe| is NULL then the data flow looks like: 50 // If |pipe| is NULL then the data flow looks like:
46 // SendPacket() -> Fake loopback pipe -> |packet_receiver|. 51 // SendPacket() -> Fake loopback pipe -> |packet_receiver|.
47 void Initialize( 52 void Initialize(
48 scoped_ptr<test::PacketPipe> pipe, 53 scoped_ptr<test::PacketPipe> pipe,
49 const PacketReceiverCallback& packet_receiver, 54 const PacketReceiverCallback& packet_receiver,
50 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 55 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
51 base::TickClock* clock); 56 base::TickClock* clock);
52 57
53 private: 58 private:
54 const scoped_refptr<CastEnvironment> cast_environment_; 59 const scoped_refptr<CastEnvironment> cast_environment_;
55 scoped_ptr<test::PacketPipe> packet_pipe_; 60 scoped_ptr<test::PacketPipe> packet_pipe_;
56 int64_t bytes_sent_; 61 int64_t bytes_sent_;
57 62
58 DISALLOW_COPY_AND_ASSIGN(LoopBackTransport); 63 DISALLOW_COPY_AND_ASSIGN(LoopBackTransport);
59 }; 64 };
60 65
61 } // namespace cast 66 } // namespace cast
62 } // namespace media 67 } // namespace media
63 68
64 #endif // MEDIA_CAST_TEST_LOOPBACK_TRANSPORT_H_ 69 #endif // MEDIA_CAST_TEST_LOOPBACK_TRANSPORT_H_
OLDNEW
« no previous file with comments | « media/cast/test/end2end_unittest.cc ('k') | media/cast/test/sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698