summaryrefslogtreecommitdiffstats
path: root/remoting/host/host_mock_objects.h
diff options
context:
space:
mode:
authoralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-12 22:28:39 +0000
committeralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-12 22:28:39 +0000
commit170cba4e5dda54ac968eac0ab72262a946b7bc55 (patch)
tree7c79ba504bb1dd673b89bc376311c80df357e043 /remoting/host/host_mock_objects.h
parent2f361c74e589febcfae4d190f793d26aac963c81 (diff)
downloadchromium_src-170cba4e5dda54ac968eac0ab72262a946b7bc55.zip
chromium_src-170cba4e5dda54ac968eac0ab72262a946b7bc55.tar.gz
chromium_src-170cba4e5dda54ac968eac0ab72262a946b7bc55.tar.bz2
[Chromoting] Refactoring DesktopEnvironment and moving screen/audio recorders to ClientSession.
This CL changes the way screen/audio recorders and event executors are managed. New DesktopEnvironmentFactory class is now used by ChromotingHost's owner to specify the kind of desktop environment (or virtual terminal) to be used by the host. Screen/audio recorders and event executors now owned by the ClientSession instance, so there is a separate set of recorders and stubs exists for each authenticated client session. Clients sessions can now be torn dowsn in parallel with the host shuttting down. This is the 4th attempt to land this change. This version includes: - |ClientSession| objects are torn down asynchronously now. - |ClientSession| objects are ref-counted to facilitate the asynchronous shutdown. They still have to be used and destroyed on the network thread. - |ChromotingHost| now waits until all connections are torn down before deleting the session manager. - The unit tests were fixed to run message loops until all asynchronous object have been destroyed. - |ClientSessionTest.ClampMouseEvents| makes sure that the expectations are destroyed when leaving TEST_F scope so that ASAN is not getting confused. BUG=134694 TEST=remoting_unittests Review URL: https://chromiumcodereview.appspot.com/10916263 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156398 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/host_mock_objects.h')
-rw-r--r--remoting/host/host_mock_objects.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/remoting/host/host_mock_objects.h b/remoting/host/host_mock_objects.h
index b0264d1..19c05bb 100644
--- a/remoting/host/host_mock_objects.h
+++ b/remoting/host/host_mock_objects.h
@@ -126,11 +126,12 @@ class MockEventExecutor : public EventExecutor {
void(const protocol::ClipboardEvent& event));
MOCK_METHOD1(InjectKeyEvent, void(const protocol::KeyEvent& event));
MOCK_METHOD1(InjectMouseEvent, void(const protocol::MouseEvent& event));
- MOCK_METHOD1(OnSessionStartedPtr,
+ MOCK_METHOD1(StartPtr,
void(protocol::ClipboardStub* client_clipboard));
- MOCK_METHOD0(OnSessionFinished, void());
+ MOCK_METHOD0(StopAndDeleteMock, void());
- void OnSessionStarted(scoped_ptr<protocol::ClipboardStub> client_clipboard);
+ void Start(scoped_ptr<protocol::ClipboardStub> client_clipboard);
+ void StopAndDelete();
private:
DISALLOW_COPY_AND_ASSIGN(MockEventExecutor);