| 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_APP_REMOTING_CONNECTION_HELPER_H_ | 5 #ifndef REMOTING_TEST_APP_REMOTING_CONNECTION_HELPER_H_ |
| 6 #define REMOTING_TEST_APP_REMOTING_CONNECTION_HELPER_H_ | 6 #define REMOTING_TEST_APP_REMOTING_CONNECTION_HELPER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // Stubs used to send messages to the remote host. Caller should not release | 48 // Stubs used to send messages to the remote host. Caller should not release |
| 49 // the objects. | 49 // the objects. |
| 50 protocol::ClipboardStub* clipboard_forwarder(); | 50 protocol::ClipboardStub* clipboard_forwarder(); |
| 51 protocol::HostStub* host_stub(); | 51 protocol::HostStub* host_stub(); |
| 52 protocol::InputStub* input_stub(); | 52 protocol::InputStub* input_stub(); |
| 53 | 53 |
| 54 // Setter for |host_message_received_callback_|. | 54 // Setter for |host_message_received_callback_|. |
| 55 void SetHostMessageReceivedCallback( | 55 void SetHostMessageReceivedCallback( |
| 56 HostMessageReceivedCallback host_message_received_callback); | 56 HostMessageReceivedCallback host_message_received_callback); |
| 57 | 57 |
| 58 // Reset |host_message_received_callback_ to null|. | |
| 59 void ResetHostMessageReceivedCallback(); | |
| 60 | |
| 61 private: | 58 private: |
| 62 // RemoteConnectionObserver interface. | 59 // RemoteConnectionObserver interface. |
| 63 void ConnectionStateChanged(protocol::ConnectionToHost::State state, | 60 void ConnectionStateChanged(protocol::ConnectionToHost::State state, |
| 64 protocol::ErrorCode error_code) override; | 61 protocol::ErrorCode error_code) override; |
| 65 void ConnectionReady(bool ready) override; | 62 void ConnectionReady(bool ready) override; |
| 66 void HostMessageReceived(const protocol::ExtensionMessage& message) override; | 63 void HostMessageReceived(const protocol::ExtensionMessage& message) override; |
| 67 | 64 |
| 68 // Sends client details to the host in order to complete the connection. | 65 // Sends client details to the host in order to complete the connection. |
| 69 void SendClientConnectionDetailsToHost(); | 66 void SendClientConnectionDetailsToHost(); |
| 70 | 67 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 97 // Creates and manages the connection to the remote host. | 94 // Creates and manages the connection to the remote host. |
| 98 scoped_ptr<TestChromotingClient> client_; | 95 scoped_ptr<TestChromotingClient> client_; |
| 99 | 96 |
| 100 DISALLOW_COPY_AND_ASSIGN(AppRemotingConnectionHelper); | 97 DISALLOW_COPY_AND_ASSIGN(AppRemotingConnectionHelper); |
| 101 }; | 98 }; |
| 102 | 99 |
| 103 } // namespace test | 100 } // namespace test |
| 104 } // namespace remoting | 101 } // namespace remoting |
| 105 | 102 |
| 106 #endif // REMOTING_TEST_APP_REMOTING_CONNECTION_HELPER_H_ | 103 #endif // REMOTING_TEST_APP_REMOTING_CONNECTION_HELPER_H_ |
| OLD | NEW |