| 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_HOST_SECURITY_KEY_FAKE_SECURITY_KEY_IPC_CLIENT_H_ | 5 #ifndef REMOTING_HOST_SECURITY_KEY_FAKE_SECURITY_KEY_IPC_CLIENT_H_ |
| 6 #define REMOTING_HOST_SECURITY_KEY_FAKE_SECURITY_KEY_IPC_CLIENT_H_ | 6 #define REMOTING_HOST_SECURITY_KEY_FAKE_SECURITY_KEY_IPC_CLIENT_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 8 #include <string> | 9 #include <string> |
| 9 | 10 |
| 10 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
| 11 #include "base/macros.h" | 12 #include "base/macros.h" |
| 12 #include "base/memory/scoped_ptr.h" | |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "remoting/host/security_key/remote_security_key_ipc_client.h" | 14 #include "remoting/host/security_key/remote_security_key_ipc_client.h" |
| 15 | 15 |
| 16 namespace IPC { | 16 namespace IPC { |
| 17 class Channel; | 17 class Channel; |
| 18 class Message; | 18 class Message; |
| 19 } // IPC | 19 } // IPC |
| 20 | 20 |
| 21 namespace remoting { | 21 namespace remoting { |
| 22 | 22 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 // IPC Client instance. | 78 // IPC Client instance. |
| 79 void OnConnectionDetails(const std::string& request_data); | 79 void OnConnectionDetails(const std::string& request_data); |
| 80 | 80 |
| 81 // Handles security key response IPC messages. | 81 // Handles security key response IPC messages. |
| 82 void OnSecurityKeyResponse(const std::string& request_data); | 82 void OnSecurityKeyResponse(const std::string& request_data); |
| 83 | 83 |
| 84 // Called when a change in the IPC channel state has occurred. | 84 // Called when a change in the IPC channel state has occurred. |
| 85 base::Closure channel_event_callback_; | 85 base::Closure channel_event_callback_; |
| 86 | 86 |
| 87 // Used for sending/receiving security key messages between processes. | 87 // Used for sending/receiving security key messages between processes. |
| 88 scoped_ptr<IPC::Channel> client_channel_; | 88 std::unique_ptr<IPC::Channel> client_channel_; |
| 89 | 89 |
| 90 // Provides the contents of the last IPC message received. | 90 // Provides the contents of the last IPC message received. |
| 91 std::string last_message_received_; | 91 std::string last_message_received_; |
| 92 | 92 |
| 93 // Determines whether EstablishIpcConnection() returns success or failure. | 93 // Determines whether EstablishIpcConnection() returns success or failure. |
| 94 bool establish_ipc_connection_should_succeed_ = true; | 94 bool establish_ipc_connection_should_succeed_ = true; |
| 95 | 95 |
| 96 // Determines whether SendSecurityKeyRequest() returns success or failure. | 96 // Determines whether SendSecurityKeyRequest() returns success or failure. |
| 97 bool send_security_request_should_succeed_ = true; | 97 bool send_security_request_should_succeed_ = true; |
| 98 | 98 |
| 99 // Value returned by WaitForSecurityKeyIpcServerChannel() method. | 99 // Value returned by WaitForSecurityKeyIpcServerChannel() method. |
| 100 bool wait_for_ipc_channel_return_value_ = true; | 100 bool wait_for_ipc_channel_return_value_ = true; |
| 101 | 101 |
| 102 // Value returned by SendSecurityKeyRequest() method. | 102 // Value returned by SendSecurityKeyRequest() method. |
| 103 std::string security_key_response_payload_; | 103 std::string security_key_response_payload_; |
| 104 | 104 |
| 105 base::WeakPtrFactory<FakeRemoteSecurityKeyIpcClient> weak_factory_; | 105 base::WeakPtrFactory<FakeRemoteSecurityKeyIpcClient> weak_factory_; |
| 106 | 106 |
| 107 DISALLOW_COPY_AND_ASSIGN(FakeRemoteSecurityKeyIpcClient); | 107 DISALLOW_COPY_AND_ASSIGN(FakeRemoteSecurityKeyIpcClient); |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 } // namespace remoting | 110 } // namespace remoting |
| 111 | 111 |
| 112 #endif // REMOTING_HOST_SECURITY_KEY_FAKE_SECURITY_KEY_IPC_CLIENT_H_ | 112 #endif // REMOTING_HOST_SECURITY_KEY_FAKE_SECURITY_KEY_IPC_CLIENT_H_ |
| OLD | NEW |