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

Unified Diff: remoting/host/host_mock_objects.h

Issue 12879006: Removed task runners from the DesktopEnviroment interface and introduced ScreenControls/ClientSessio (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/desktop_session_proxy.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 4c836855e125e2ac06ef5396e4c2cee9d9d7b8b6..04aaaa77438e6b765175fb7fcceef3e384ddacfd 100644
--- a/remoting/host/host_mock_objects.h
+++ b/remoting/host/host_mock_objects.h
@@ -8,14 +8,15 @@
#include "net/base/ip_endpoint.h"
#include "remoting/host/chromoting_host_context.h"
#include "remoting/host/client_session.h"
+#include "remoting/host/client_session_control.h"
#include "remoting/host/continue_window.h"
#include "remoting/host/desktop_environment.h"
#include "remoting/host/disconnect_window.h"
#include "remoting/host/host_status_observer.h"
#include "remoting/host/input_injector.h"
#include "remoting/host/local_input_monitor.h"
+#include "remoting/host/screen_controls.h"
#include "remoting/host/screen_resolution.h"
-#include "remoting/host/session_controller.h"
#include "remoting/proto/control.pb.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -30,27 +31,16 @@ class MockDesktopEnvironment : public DesktopEnvironment {
MockDesktopEnvironment();
virtual ~MockDesktopEnvironment();
- MOCK_METHOD1(CreateAudioCapturerPtr,
- AudioCapturer*(scoped_refptr<base::SingleThreadTaskRunner>));
- MOCK_METHOD2(CreateInputInjectorPtr,
- InputInjector*(scoped_refptr<base::SingleThreadTaskRunner>,
- scoped_refptr<base::SingleThreadTaskRunner>));
- MOCK_METHOD0(CreateSessionControllerPtr, SessionController*());
- MOCK_METHOD2(
- CreateVideoCapturerPtr,
- media::ScreenCapturer*(scoped_refptr<base::SingleThreadTaskRunner>,
- scoped_refptr<base::SingleThreadTaskRunner>));
+ MOCK_METHOD0(CreateAudioCapturerPtr, AudioCapturer*());
+ MOCK_METHOD0(CreateInputInjectorPtr, InputInjector*());
+ MOCK_METHOD0(CreateScreenControlsPtr, ScreenControls*());
+ MOCK_METHOD0(CreateVideoCapturerPtr, media::ScreenCapturer*());
// DesktopEnvironment implementation.
- virtual scoped_ptr<AudioCapturer> CreateAudioCapturer(
- scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner) OVERRIDE;
- virtual scoped_ptr<InputInjector> CreateInputInjector(
- scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
- scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) OVERRIDE;
- virtual scoped_ptr<SessionController> CreateSessionController() OVERRIDE;
- virtual scoped_ptr<media::ScreenCapturer> CreateVideoCapturer(
- scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner,
- scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner) OVERRIDE;
+ virtual scoped_ptr<AudioCapturer> CreateAudioCapturer() OVERRIDE;
+ virtual scoped_ptr<InputInjector> CreateInputInjector() OVERRIDE;
+ virtual scoped_ptr<ScreenControls> CreateScreenControls() OVERRIDE;
+ virtual scoped_ptr<media::ScreenCapturer> CreateVideoCapturer() OVERRIDE;
};
class MockDisconnectWindow : public DisconnectWindow {
@@ -112,8 +102,7 @@ class MockDesktopEnvironmentFactory : public DesktopEnvironmentFactory {
MOCK_CONST_METHOD0(SupportsAudioCapture, bool());
virtual scoped_ptr<DesktopEnvironment> Create(
- const std::string& client_jid,
- const base::Closure& disconnect_callback) OVERRIDE;
+ base::WeakPtr<ClientSessionControl> client_session_control) OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(MockDesktopEnvironmentFactory);
@@ -154,17 +143,6 @@ class MockHostStatusObserver : public HostStatusObserver {
MOCK_METHOD0(OnShutdown, void());
};
-class MockSessionController : public SessionController {
- public:
- MockSessionController();
- virtual ~MockSessionController();
-
- MOCK_METHOD1(SetScreenResolution, void(const ScreenResolution&));
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MockSessionController);
-};
-
} // namespace remoting
#endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_
« no previous file with comments | « remoting/host/desktop_session_proxy.cc ('k') | remoting/host/host_mock_objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698