| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_TEST_CHROMOTING_CLIENT_H_ | 5 #ifndef REMOTING_TEST_TEST_CHROMOTING_CLIENT_H_ |
| 6 #define REMOTING_TEST_TEST_CHROMOTING_CLIENT_H_ | 6 #define REMOTING_TEST_TEST_CHROMOTING_CLIENT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 // callback. | 39 // callback. |
| 40 // A VideoRenderer can be passed in to customize the connection. | 40 // A VideoRenderer can be passed in to customize the connection. |
| 41 class TestChromotingClient : public ClientUserInterface, | 41 class TestChromotingClient : public ClientUserInterface, |
| 42 public protocol::ClipboardStub, | 42 public protocol::ClipboardStub, |
| 43 public protocol::CursorShapeStub { | 43 public protocol::CursorShapeStub { |
| 44 public: | 44 public: |
| 45 TestChromotingClient(); | 45 TestChromotingClient(); |
| 46 explicit TestChromotingClient(scoped_ptr<VideoRenderer> video_renderer); | 46 explicit TestChromotingClient(scoped_ptr<VideoRenderer> video_renderer); |
| 47 ~TestChromotingClient() override; | 47 ~TestChromotingClient() override; |
| 48 | 48 |
| 49 // Converts the state into a string. |
| 50 static const char* ConnectionStateToFriendlyString( |
| 51 remoting::protocol::ConnectionToHost::State state); |
| 52 |
| 49 // Starts a Chromoting connection using the specified connection setup info. | 53 // Starts a Chromoting connection using the specified connection setup info. |
| 50 void StartConnection(const ConnectionSetupInfo& connection_setup_info); | 54 void StartConnection(const ConnectionSetupInfo& connection_setup_info); |
| 51 | 55 |
| 52 // Ends the current remote connection and updates the connection state. | 56 // Ends the current remote connection and updates the connection state. |
| 53 void EndConnection(); | 57 void EndConnection(); |
| 54 | 58 |
| 55 // Stubs used to send messages to the remote host. | 59 // Stubs used to send messages to the remote host. |
| 56 protocol::ClipboardStub* clipboard_forwarder() { | 60 protocol::ClipboardStub* clipboard_forwarder() { |
| 57 return chromoting_client_->clipboard_forwarder(); | 61 return chromoting_client_->clipboard_forwarder(); |
| 58 } | 62 } |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 // Used to establish an XMPP connection with the google talk service. | 121 // Used to establish an XMPP connection with the google talk service. |
| 118 scoped_ptr<XmppSignalStrategy> signal_strategy_; | 122 scoped_ptr<XmppSignalStrategy> signal_strategy_; |
| 119 | 123 |
| 120 DISALLOW_COPY_AND_ASSIGN(TestChromotingClient); | 124 DISALLOW_COPY_AND_ASSIGN(TestChromotingClient); |
| 121 }; | 125 }; |
| 122 | 126 |
| 123 } // namespace test | 127 } // namespace test |
| 124 } // namespace remoting | 128 } // namespace remoting |
| 125 | 129 |
| 126 #endif // REMOTING_TEST_TEST_CHROMOTING_CLIENT_H_ | 130 #endif // REMOTING_TEST_TEST_CHROMOTING_CLIENT_H_ |
| OLD | NEW |