diff options
author | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-09 03:04:56 +0000 |
---|---|---|
committer | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-09 03:04:56 +0000 |
commit | 61cfdc559d4939f1ced7fdb173597d0d2c382d19 (patch) | |
tree | de1ffaf56503a6d80857cf2df72c0793586af844 /remoting/host/client_session_unittest.cc | |
parent | d3a5a0b2f0cc1fc01ee544d1b382334a36a845d3 (diff) | |
download | chromium_src-61cfdc559d4939f1ced7fdb173597d0d2c382d19.zip chromium_src-61cfdc559d4939f1ced7fdb173597d0d2c382d19.tar.gz chromium_src-61cfdc559d4939f1ced7fdb173597d0d2c382d19.tar.bz2 |
ResizingHostObserver is created by the desktop environment together with other stubs.
ResizingHostObserver is responsible to resizing the host desktop so that it matches the client resolution. This CL makes the desktop environment responsible for creation of ResizingHostObserver object along with other stubs.
Related changes:
- Added a new interface: SessionController. Objects implementing it will be responsible for handling control events. The client resolution change is the only supported event at the moment.
- Removed OnClientResolutionChanged() from the host status observer.
- The multi-process host does not handle OnClientResolutionChanged() notifications at the moment.
BUG=137696
Review URL: https://chromiumcodereview.appspot.com/12545026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187130 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/client_session_unittest.cc')
-rw-r--r-- | remoting/host/client_session_unittest.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/remoting/host/client_session_unittest.cc b/remoting/host/client_session_unittest.cc index 9eb6348..a7893a4 100644 --- a/remoting/host/client_session_unittest.cc +++ b/remoting/host/client_session_unittest.cc @@ -77,6 +77,10 @@ class ClientSessionTest : public testing::Test { scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); + // Creates a dummy SessionController, to mock + // DesktopEnvironment::CreateSessionController(). + SessionController* CreateSessionController(); + // Creates a fake media::ScreenCapturer, to mock // DesktopEnvironment::CreateVideoCapturer(). media::ScreenCapturer* CreateVideoCapturer( @@ -195,6 +199,8 @@ DesktopEnvironment* ClientSessionTest::CreateDesktopEnvironment() { .Times(0); EXPECT_CALL(*desktop_environment, CreateEventExecutorPtr(_, _)) .WillOnce(Invoke(this, &ClientSessionTest::CreateEventExecutor)); + EXPECT_CALL(*desktop_environment, CreateSessionControllerPtr()) + .WillOnce(Invoke(this, &ClientSessionTest::CreateSessionController)); EXPECT_CALL(*desktop_environment, CreateVideoCapturerPtr(_, _)) .WillOnce(Invoke(this, &ClientSessionTest::CreateVideoCapturer)); @@ -208,6 +214,10 @@ EventExecutor* ClientSessionTest::CreateEventExecutor( return event_executor_.release(); } +SessionController* ClientSessionTest::CreateSessionController() { + return new MockSessionController(); +} + media::ScreenCapturer* ClientSessionTest::CreateVideoCapturer( scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner, scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner) { |