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

Unified Diff: remoting/host/host_mock_objects.h

Issue 11363128: Converted VideoFrameCapturer callbacks into a VideoFrameCapturer::Delegate interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More Mac compilation issues. Created 8 years, 1 month 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
« no previous file with comments | « remoting/host/client_session_unittest.cc ('k') | remoting/host/host_mock_objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/host_mock_objects.h
diff --git a/remoting/host/host_mock_objects.h b/remoting/host/host_mock_objects.h
index d5ebcdb952c5ffee1f2ecbd6a94013f14de46afe..4eaee556311c9287d29a7a7884e3cedad04ed84c 100644
--- a/remoting/host/host_mock_objects.h
+++ b/remoting/host/host_mock_objects.h
@@ -6,6 +6,7 @@
#define REMOTING_HOST_HOST_MOCK_OBJECTS_H_
#include "net/base/ip_endpoint.h"
+#include "remoting/base/capture_data.h"
#include "remoting/host/video_frame_capturer.h"
#include "remoting/host/chromoting_host_context.h"
#include "remoting/host/client_session.h"
@@ -17,39 +18,42 @@
#include "remoting/host/host_status_observer.h"
#include "remoting/host/local_input_monitor.h"
#include "remoting/host/user_authenticator.h"
+#include "remoting/proto/control.pb.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace remoting {
-class MockCaptureCompletedCallback {
- public:
- MockCaptureCompletedCallback();
- virtual ~MockCaptureCompletedCallback();
-
- MOCK_METHOD1(CaptureCompletedPtr, void(CaptureData* capture_data));
- void CaptureCompleted(scoped_refptr<CaptureData> capture_data);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MockCaptureCompletedCallback);
-};
-
class MockVideoFrameCapturer : public VideoFrameCapturer {
public:
MockVideoFrameCapturer();
virtual ~MockVideoFrameCapturer();
- MOCK_METHOD1(Start, void(const CursorShapeChangedCallback& callback));
+ MOCK_METHOD1(Start, void(Delegate* delegate));
MOCK_METHOD0(Stop, void());
MOCK_CONST_METHOD0(pixel_format, media::VideoFrame::Format());
MOCK_METHOD1(InvalidateRegion, void(const SkRegion& invalid_region));
- MOCK_METHOD1(CaptureInvalidRegion,
- void(const CaptureCompletedCallback& callback));
+ MOCK_METHOD0(CaptureInvalidRegion, void());
MOCK_CONST_METHOD0(size_most_recent, const SkISize&());
private:
DISALLOW_COPY_AND_ASSIGN(MockVideoFrameCapturer);
};
+class MockVideoFrameCapturerDelegate : public VideoFrameCapturer::Delegate {
+ public:
+ MockVideoFrameCapturerDelegate();
+ virtual ~MockVideoFrameCapturerDelegate();
+
+ virtual void OnCursorShapeChanged(
+ scoped_ptr<protocol::CursorShapeInfo> cursor_shape) OVERRIDE;
+
+ MOCK_METHOD1(OnCaptureCompleted, void(scoped_refptr<CaptureData>));
+ MOCK_METHOD1(OnCursorShapeChangedPtr, void(protocol::CursorShapeInfo*));
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MockVideoFrameCapturerDelegate);
+};
+
class MockDisconnectWindow : public DisconnectWindow {
public:
MockDisconnectWindow();
« no previous file with comments | « remoting/host/client_session_unittest.cc ('k') | remoting/host/host_mock_objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698