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

Side by Side Diff: remoting/test/it2me_standalone_host.h

Issue 1923573006: Implement a dummy host to do capturing and analysis only. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolve review comments Created 4 years, 7 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef REMOTING_TEST_IT2ME_STANDALONE_HOST_H_
6 #define REMOTING_TEST_IT2ME_STANDALONE_HOST_H_
7
8 #include <memory>
9 #include <string>
10
11 #include "base/message_loop/message_loop.h"
12 #include "base/run_loop.h"
13 #include "base/timer/timer.h"
14 #include "remoting/host/host_mock_objects.h"
15 #include "remoting/host/it2me_desktop_environment.h"
16 #include "remoting/protocol/fake_connection_to_client.h"
17 #include "remoting/test/fake_connection_event_logger.h"
18 #include "testing/gmock/include/gmock/gmock.h"
19
20 namespace remoting {
21 class ChromotingHostContext;
22 class ClientSession;
23
24 namespace protocol {
25 class SessionConfig;
26 } // namespace protocol
27
28 namespace test {
29
30 // An container for an it2me host by using Counter*Stub(s) to do capturing
joedow 2016/05/04 22:58:49 May also be good to update this since the Counter*
joedow 2016/05/04 22:58:49 s/An/A
Hzj_jie 2016/05/05 00:47:36 Done.
Hzj_jie 2016/05/05 00:47:36 Done.
31 // without needing a client to connect to.
32 class It2MeStandaloneHost {
33 public:
34 It2MeStandaloneHost();
35 ~It2MeStandaloneHost();
36
37 // Block current thread forever.
38 void Run();
39
40 void StartOutputTimer();
41
42 private:
43 void Connect();
44
45 base::MessageLoopForUI message_loop_;
46 base::RunLoop run_loop_;
47 std::unique_ptr<ChromotingHostContext> context_;
48 It2MeDesktopEnvironmentFactory factory_;
49 protocol::FakeConnectionToClient connection_;
50 std::string session_jid_;
51 std::unique_ptr<protocol::SessionConfig> config_;
52 FakeConnectionEventLogger stubs_;
joedow 2016/05/04 22:58:49 Update name from stubs_ to event_logger_?
Hzj_jie 2016/05/05 00:47:36 Done.
53 testing::NiceMock<MockClientSessionEventHandler> handler_;
54 std::unique_ptr<ClientSession> session_;
55 base::RepeatingTimer timer_;
56 };
57
58 } // namespace test
59 } // namespace remoting
60
61 #endif // REMOTING_TEST_IT2ME_STANDALONE_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698