Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef REMOTING_TEST_IT2ME_STANDALONE_HOST_H_ | 5 #ifndef REMOTING_TEST_IT2ME_STANDALONE_HOST_H_ |
| 6 #define REMOTING_TEST_IT2ME_STANDALONE_HOST_H_ | 6 #define REMOTING_TEST_IT2ME_STANDALONE_HOST_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/message_loop/message_loop.h" | |
| 13 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
| 13 #include "base/test/scoped_task_environment.h" | |
| 14 #include "base/timer/timer.h" | 14 #include "base/timer/timer.h" |
| 15 #include "remoting/host/host_mock_objects.h" | 15 #include "remoting/host/host_mock_objects.h" |
| 16 #include "remoting/host/it2me_desktop_environment.h" | 16 #include "remoting/host/it2me_desktop_environment.h" |
| 17 #include "remoting/protocol/fake_connection_to_client.h" | 17 #include "remoting/protocol/fake_connection_to_client.h" |
| 18 #include "remoting/test/fake_connection_event_logger.h" | 18 #include "remoting/test/fake_connection_event_logger.h" |
| 19 #include "testing/gmock/include/gmock/gmock.h" | 19 #include "testing/gmock/include/gmock/gmock.h" |
| 20 | 20 |
| 21 namespace remoting { | 21 namespace remoting { |
| 22 class ChromotingHostContext; | 22 class ChromotingHostContext; |
| 23 class ClientSession; | 23 class ClientSession; |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 36 ~It2MeStandaloneHost(); | 36 ~It2MeStandaloneHost(); |
| 37 | 37 |
| 38 // Block current thread forever. | 38 // Block current thread forever. |
| 39 void Run(); | 39 void Run(); |
| 40 | 40 |
| 41 void StartOutputTimer(); | 41 void StartOutputTimer(); |
| 42 | 42 |
| 43 private: | 43 private: |
| 44 void Connect(); | 44 void Connect(); |
| 45 | 45 |
| 46 base::MessageLoopForUI message_loop_; | 46 base::test::ScopedTaskEnvironment scoped_task_environment_; |
|
gab
2017/04/28 01:34:44
ditto https://codereview.chromium.org/2849603003/d
fdoray
2017/04/28 13:25:26
No. Compiler complains that there is no assignment
| |
| 47 base::RunLoop run_loop_; | 47 base::RunLoop run_loop_; |
| 48 std::unique_ptr<ChromotingHostContext> context_; | 48 std::unique_ptr<ChromotingHostContext> context_; |
| 49 scoped_refptr<AutoThreadTaskRunner> main_task_runner_; | 49 scoped_refptr<AutoThreadTaskRunner> main_task_runner_; |
| 50 It2MeDesktopEnvironmentFactory factory_; | 50 It2MeDesktopEnvironmentFactory factory_; |
| 51 protocol::FakeConnectionToClient connection_; | 51 protocol::FakeConnectionToClient connection_; |
| 52 std::string session_jid_; | 52 std::string session_jid_; |
| 53 std::unique_ptr<protocol::SessionConfig> config_; | 53 std::unique_ptr<protocol::SessionConfig> config_; |
| 54 FakeConnectionEventLogger event_logger_; | 54 FakeConnectionEventLogger event_logger_; |
| 55 testing::NiceMock<MockClientSessionEventHandler> handler_; | 55 testing::NiceMock<MockClientSessionEventHandler> handler_; |
| 56 std::unique_ptr<ClientSession> session_; | 56 std::unique_ptr<ClientSession> session_; |
| 57 base::RepeatingTimer timer_; | 57 base::RepeatingTimer timer_; |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 } // namespace test | 60 } // namespace test |
| 61 } // namespace remoting | 61 } // namespace remoting |
| 62 | 62 |
| 63 #endif // REMOTING_TEST_IT2ME_STANDALONE_HOST_H_ | 63 #endif // REMOTING_TEST_IT2ME_STANDALONE_HOST_H_ |
| OLD | NEW |