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

Side by Side Diff: remoting/protocol/protocol_mock_objects.h

Issue 9827006: Refactor VideoStub interface to accept ownership of video packets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « remoting/protocol/protobuf_video_writer.cc ('k') | remoting/protocol/rtp_video_reader.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ 5 #ifndef REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_
6 #define REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ 6 #define REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "net/base/ip_endpoint.h" 10 #include "net/base/ip_endpoint.h"
11 #include "remoting/proto/internal.pb.h" 11 #include "remoting/proto/internal.pb.h"
12 #include "remoting/proto/video.pb.h"
12 #include "remoting/protocol/client_stub.h" 13 #include "remoting/protocol/client_stub.h"
13 #include "remoting/protocol/clipboard_stub.h" 14 #include "remoting/protocol/clipboard_stub.h"
14 #include "remoting/protocol/connection_to_client.h" 15 #include "remoting/protocol/connection_to_client.h"
15 #include "remoting/protocol/host_event_stub.h" 16 #include "remoting/protocol/host_event_stub.h"
16 #include "remoting/protocol/host_stub.h" 17 #include "remoting/protocol/host_stub.h"
17 #include "remoting/protocol/input_stub.h" 18 #include "remoting/protocol/input_stub.h"
18 #include "remoting/protocol/session.h" 19 #include "remoting/protocol/session.h"
19 #include "remoting/protocol/transport.h" 20 #include "remoting/protocol/transport.h"
20 #include "remoting/protocol/video_stub.h" 21 #include "remoting/protocol/video_stub.h"
21 #include "testing/gmock/include/gmock/gmock.h" 22 #include "testing/gmock/include/gmock/gmock.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 114
114 private: 115 private:
115 DISALLOW_COPY_AND_ASSIGN(MockClientStub); 116 DISALLOW_COPY_AND_ASSIGN(MockClientStub);
116 }; 117 };
117 118
118 class MockVideoStub : public VideoStub { 119 class MockVideoStub : public VideoStub {
119 public: 120 public:
120 MockVideoStub(); 121 MockVideoStub();
121 virtual ~MockVideoStub(); 122 virtual ~MockVideoStub();
122 123
123 MOCK_METHOD2(ProcessVideoPacket, void(const VideoPacket* video_packet, 124 MOCK_METHOD2(ProcessVideoPacketPtr, void(const VideoPacket* video_packet,
124 const base::Closure& done)); 125 const base::Closure& done));
126 virtual void ProcessVideoPacket(scoped_ptr<VideoPacket> video_packet,
127 const base::Closure& done) {
128 ProcessVideoPacketPtr(video_packet.get(), done);
129 }
130
125 MOCK_METHOD0(GetPendingPackets, int()); 131 MOCK_METHOD0(GetPendingPackets, int());
126 132
127 private: 133 private:
128 DISALLOW_COPY_AND_ASSIGN(MockVideoStub); 134 DISALLOW_COPY_AND_ASSIGN(MockVideoStub);
129 }; 135 };
130 136
131 class MockSession : public Session { 137 class MockSession : public Session {
132 public: 138 public:
133 MockSession(); 139 MockSession();
134 virtual ~MockSession(); 140 virtual ~MockSession();
(...skipping 26 matching lines...) Expand all
161 MOCK_METHOD0(Close, void()); 167 MOCK_METHOD0(Close, void());
162 168
163 private: 169 private:
164 DISALLOW_COPY_AND_ASSIGN(MockSession); 170 DISALLOW_COPY_AND_ASSIGN(MockSession);
165 }; 171 };
166 172
167 } // namespace protocol 173 } // namespace protocol
168 } // namespace remoting 174 } // namespace remoting
169 175
170 #endif // REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ 176 #endif // REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_
OLDNEW
« no previous file with comments | « remoting/protocol/protobuf_video_writer.cc ('k') | remoting/protocol/rtp_video_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698