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

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 commnets 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
« no previous file with comments | « remoting/test/fake_connection_event_logger.cc ('k') | remoting/test/it2me_standalone_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/memory/ref_counted.h"
12 #include "base/message_loop/message_loop.h"
13 #include "base/run_loop.h"
14 #include "base/timer/timer.h"
15 #include "remoting/host/host_mock_objects.h"
16 #include "remoting/host/it2me_desktop_environment.h"
17 #include "remoting/protocol/fake_connection_to_client.h"
18 #include "remoting/test/fake_connection_event_logger.h"
19 #include "testing/gmock/include/gmock/gmock.h"
20
21 namespace remoting {
22 class ChromotingHostContext;
23 class ClientSession;
24
25 namespace protocol {
26 class SessionConfig;
27 } // namespace protocol
28
29 namespace test {
30
31 // A container for an it2me host by using FakeConnectionEventLogger to do
32 // capturing without needing a client to connect to.
33 class It2MeStandaloneHost {
34 public:
35 It2MeStandaloneHost();
36 ~It2MeStandaloneHost();
37
38 // Block current thread forever.
39 void Run();
40
41 void StartOutputTimer();
42
43 private:
44 void Connect();
45
46 base::MessageLoopForUI message_loop_;
47 base::RunLoop run_loop_;
48 std::unique_ptr<ChromotingHostContext> context_;
49 scoped_refptr<AutoThreadTaskRunner> main_task_runner_;
50 It2MeDesktopEnvironmentFactory factory_;
51 protocol::FakeConnectionToClient connection_;
52 std::string session_jid_;
53 std::unique_ptr<protocol::SessionConfig> config_;
54 FakeConnectionEventLogger event_logger_;
55 testing::NiceMock<MockClientSessionEventHandler> handler_;
56 std::unique_ptr<ClientSession> session_;
57 base::RepeatingTimer timer_;
58 };
59
60 } // namespace test
61 } // namespace remoting
62
63 #endif // REMOTING_TEST_IT2ME_STANDALONE_HOST_H_
OLDNEW
« no previous file with comments | « remoting/test/fake_connection_event_logger.cc ('k') | remoting/test/it2me_standalone_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698