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

Side by Side 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: 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 unified diff | Download patch | Annotate | Revision Log
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_HOST_HOST_MOCK_OBJECTS_H_ 5 #ifndef REMOTING_HOST_HOST_MOCK_OBJECTS_H_
6 #define REMOTING_HOST_HOST_MOCK_OBJECTS_H_ 6 #define REMOTING_HOST_HOST_MOCK_OBJECTS_H_
7 7
8 #include "net/base/ip_endpoint.h" 8 #include "net/base/ip_endpoint.h"
9 #include "remoting/host/video_frame_capturer.h" 9 #include "remoting/host/video_frame_capturer.h"
10 #include "remoting/host/chromoting_host_context.h" 10 #include "remoting/host/chromoting_host_context.h"
11 #include "remoting/host/client_session.h" 11 #include "remoting/host/client_session.h"
12 #include "remoting/host/continue_window.h" 12 #include "remoting/host/continue_window.h"
13 #include "remoting/host/desktop_environment.h" 13 #include "remoting/host/desktop_environment.h"
14 #include "remoting/host/desktop_environment_factory.h" 14 #include "remoting/host/desktop_environment_factory.h"
15 #include "remoting/host/disconnect_window.h" 15 #include "remoting/host/disconnect_window.h"
16 #include "remoting/host/event_executor.h" 16 #include "remoting/host/event_executor.h"
17 #include "remoting/host/host_status_observer.h" 17 #include "remoting/host/host_status_observer.h"
18 #include "remoting/host/local_input_monitor.h" 18 #include "remoting/host/local_input_monitor.h"
19 #include "remoting/host/user_authenticator.h" 19 #include "remoting/host/user_authenticator.h"
20 #include "testing/gmock/include/gmock/gmock.h" 20 #include "testing/gmock/include/gmock/gmock.h"
21 21
22 namespace remoting { 22 namespace remoting {
23 23
24 class MockCaptureCompletedCallback {
25 public:
26 MockCaptureCompletedCallback();
27 virtual ~MockCaptureCompletedCallback();
28
29 MOCK_METHOD1(CaptureCompletedPtr, void(CaptureData* capture_data));
30 void CaptureCompleted(scoped_refptr<CaptureData> capture_data);
31
32 private:
33 DISALLOW_COPY_AND_ASSIGN(MockCaptureCompletedCallback);
34 };
35
36 class MockVideoFrameCapturer : public VideoFrameCapturer { 24 class MockVideoFrameCapturer : public VideoFrameCapturer {
37 public: 25 public:
38 MockVideoFrameCapturer(); 26 MockVideoFrameCapturer();
39 virtual ~MockVideoFrameCapturer(); 27 virtual ~MockVideoFrameCapturer();
40 28
41 MOCK_METHOD1(Start, void(const CursorShapeChangedCallback& callback)); 29 MOCK_METHOD1(Start, void(Delegate* delegate));
42 MOCK_METHOD0(Stop, void()); 30 MOCK_METHOD0(Stop, void());
43 MOCK_CONST_METHOD0(pixel_format, media::VideoFrame::Format()); 31 MOCK_CONST_METHOD0(pixel_format, media::VideoFrame::Format());
44 MOCK_METHOD1(InvalidateRegion, void(const SkRegion& invalid_region)); 32 MOCK_METHOD1(InvalidateRegion, void(const SkRegion& invalid_region));
45 MOCK_METHOD1(CaptureInvalidRegion, 33 MOCK_METHOD0(CaptureInvalidRegion, void());
46 void(const CaptureCompletedCallback& callback));
47 MOCK_CONST_METHOD0(size_most_recent, const SkISize&()); 34 MOCK_CONST_METHOD0(size_most_recent, const SkISize&());
48 35
49 private: 36 private:
50 DISALLOW_COPY_AND_ASSIGN(MockVideoFrameCapturer); 37 DISALLOW_COPY_AND_ASSIGN(MockVideoFrameCapturer);
51 }; 38 };
52 39
53 class MockDisconnectWindow : public DisconnectWindow { 40 class MockDisconnectWindow : public DisconnectWindow {
54 public: 41 public:
55 MockDisconnectWindow(); 42 MockDisconnectWindow();
56 virtual ~MockDisconnectWindow(); 43 virtual ~MockDisconnectWindow();
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 MOCK_METHOD2(Authenticate, bool(const std::string& username, 164 MOCK_METHOD2(Authenticate, bool(const std::string& username,
178 const std::string& password)); 165 const std::string& password));
179 166
180 private: 167 private:
181 DISALLOW_COPY_AND_ASSIGN(MockUserAuthenticator); 168 DISALLOW_COPY_AND_ASSIGN(MockUserAuthenticator);
182 }; 169 };
183 170
184 } // namespace remoting 171 } // namespace remoting
185 172
186 #endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_ 173 #endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698