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

Unified Diff: remoting/protocol/protocol_mock_objects.h

Issue 850983002: Implement video frame acknowledgements in the chromoting protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: remoting/protocol/protocol_mock_objects.h
diff --git a/remoting/protocol/protocol_mock_objects.h b/remoting/protocol/protocol_mock_objects.h
index 24db36d78f5d3e20406dbf20d749bc838597b0b6..a0b034ff1171a8ad62ae6dab3f12bbbe1baa1c85 100644
--- a/remoting/protocol/protocol_mock_objects.h
+++ b/remoting/protocol/protocol_mock_objects.h
@@ -24,7 +24,7 @@
#include "remoting/protocol/session.h"
#include "remoting/protocol/session_manager.h"
#include "remoting/protocol/transport.h"
-#include "remoting/protocol/video_stub.h"
+#include "remoting/protocol/video_sender.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace remoting {
@@ -37,7 +37,7 @@ class MockConnectionToClient : public ConnectionToClient {
virtual ~MockConnectionToClient();
MOCK_METHOD1(Init, void(Session* session));
- MOCK_METHOD0(video_stub, VideoStub*());
+ MOCK_METHOD0(video_sender, VideoSender*());
MOCK_METHOD0(client_stub, ClientStub*());
MOCK_METHOD0(session, Session*());
MOCK_METHOD0(Disconnect, void());
@@ -162,8 +162,8 @@ class MockVideoStub : public VideoStub {
MOCK_METHOD2(ProcessVideoPacketPtr, void(const VideoPacket* video_packet,
const base::Closure& done));
- virtual void ProcessVideoPacket(scoped_ptr<VideoPacket> video_packet,
- const base::Closure& done) {
+ void ProcessVideoPacket(scoped_ptr<VideoPacket> video_packet,
+ const base::Closure& done) override {
ProcessVideoPacketPtr(video_packet.get(), done);
}
@@ -171,6 +171,23 @@ class MockVideoStub : public VideoStub {
DISALLOW_COPY_AND_ASSIGN(MockVideoStub);
};
+class MockVideoSender : public VideoSender {
+ public:
+ MockVideoSender();
+ virtual ~MockVideoSender();
+
+ MOCK_METHOD2(ProcessVideoPacketPtr, void(const VideoPacket* video_packet,
+ const base::Closure& done));
+ void ProcessVideoPacket(scoped_ptr<VideoPacket> video_packet,
+ const base::Closure& done) override {
+ ProcessVideoPacketPtr(video_packet.get(), done);
+ }
+ bool SupportsAcks() override { return true; }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MockVideoSender);
+};
+
class MockSession : public Session {
public:
MockSession();

Powered by Google App Engine
This is Rietveld 408576698