[email protected] | c2b37440 | 2012-03-12 19:23:07 | [diff] [blame] | 1 | // Copyright (c) 2012 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 | |
[email protected] | ff72dd1 | 2012-11-27 05:18:25 | [diff] [blame] | 5 | #ifndef REMOTING_HOST_CHROMOTING_MESSAGES_H_ |
| 6 | #define REMOTING_HOST_CHROMOTING_MESSAGES_H_ |
| 7 | |
avi | c5960f3 | 2015-12-22 22:49:48 | [diff] [blame] | 8 | #include <stdint.h> |
| 9 | |
Erik Jensen | 8f1acc1 | 2019-01-14 20:18:31 | [diff] [blame] | 10 | #include "base/files/file_path.h" |
Matthew Cary | 7d8e48e | 2019-04-16 08:32:36 | [diff] [blame] | 11 | #include "base/memory/read_only_shared_memory_region.h" |
zijiehe | 36763d8 | 2017-06-19 23:52:31 | [diff] [blame] | 12 | #include "base/time/time.h" |
sammc | e66272fae | 2016-11-01 03:49:04 | [diff] [blame] | 13 | #include "ipc/ipc_channel_handle.h" |
[email protected] | ff72dd1 | 2012-11-27 05:18:25 | [diff] [blame] | 14 | #include "ipc/ipc_platform_file.h" |
[email protected] | b9ed58f | 2013-05-16 10:45:24 | [diff] [blame] | 15 | #include "remoting/host/chromoting_param_traits.h" |
sergeyu | c986f52 | 2016-11-28 22:51:01 | [diff] [blame] | 16 | #include "remoting/host/desktop_environment_options.h" |
[email protected] | 739e280 | 2013-03-18 01:03:48 | [diff] [blame] | 17 | #include "remoting/host/screen_resolution.h" |
Joe Downing | 505ae0d0 | 2018-10-17 17:47:30 | [diff] [blame] | 18 | #include "remoting/proto/action.pb.h" |
zijiehe | 36763d8 | 2017-06-19 23:52:31 | [diff] [blame] | 19 | #include "remoting/proto/process_stats.pb.h" |
sergeyu | ec77d854 | 2015-11-03 22:31:00 | [diff] [blame] | 20 | #include "remoting/protocol/errors.h" |
Erik Jensen | 042b439 | 2019-01-17 20:32:31 | [diff] [blame] | 21 | #include "remoting/protocol/file_transfer_helpers.h" |
[email protected] | 39a631b | 2013-03-04 22:19:05 | [diff] [blame] | 22 | #include "remoting/protocol/transport.h" |
sergeyu | 546cbaa | 2016-06-17 20:39:32 | [diff] [blame] | 23 | #include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h" |
[email protected] | b9ed58f | 2013-05-16 10:45:24 | [diff] [blame] | 24 | #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" |
[email protected] | ff72dd1 | 2012-11-27 05:18:25 | [diff] [blame] | 25 | |
| 26 | #endif // REMOTING_HOST_CHROMOTING_MESSAGES_H_ |
[email protected] | c2b37440 | 2012-03-12 19:23:07 | [diff] [blame] | 27 | |
| 28 | // Multiply-included message file, no traditional include guard. |
| 29 | #include "ipc/ipc_message_macros.h" |
| 30 | |
| 31 | #define IPC_MESSAGE_START ChromotingMsgStart |
[email protected] | df338b7d | 2012-09-05 19:58:36 | [diff] [blame] | 32 | |
| 33 | //----------------------------------------------------------------------------- |
[email protected] | e9057a6f | 2013-03-08 22:37:55 | [diff] [blame] | 34 | // Chromoting messages sent from the daemon. |
[email protected] | df338b7d | 2012-09-05 19:58:36 | [diff] [blame] | 35 | |
[email protected] | e9057a6f | 2013-03-08 22:37:55 | [diff] [blame] | 36 | // Requests the receiving process to crash producing a crash dump. The daemon |
[email protected] | 13d9ffb | 2012-10-23 22:23:50 | [diff] [blame] | 37 | // sends this message when a fatal error has been detected indicating that |
[email protected] | e9057a6f | 2013-03-08 22:37:55 | [diff] [blame] | 38 | // the receiving process misbehaves. The daemon passes the location of the code |
[email protected] | 13d9ffb | 2012-10-23 22:23:50 | [diff] [blame] | 39 | // that detected the error. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 40 | IPC_MESSAGE_CONTROL(ChromotingDaemonMsg_Crash, |
| 41 | std::string /* function_name */, |
| 42 | std::string /* file_name */, |
| 43 | int /* line_number */) |
[email protected] | 13d9ffb | 2012-10-23 22:23:50 | [diff] [blame] | 44 | |
[email protected] | e9057a6f | 2013-03-08 22:37:55 | [diff] [blame] | 45 | //----------------------------------------------------------------------------- |
| 46 | // Chromoting messages sent from the daemon to the network process. |
| 47 | |
[email protected] | df338b7d | 2012-09-05 19:58:36 | [diff] [blame] | 48 | // Delivers the host configuration (and updates) to the network process. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 49 | IPC_MESSAGE_CONTROL(ChromotingDaemonNetworkMsg_Configuration, std::string) |
[email protected] | 60ccc24 | 2012-10-17 21:06:24 | [diff] [blame] | 50 | |
[email protected] | 7fe3ce4 | 2014-02-11 02:27:48 | [diff] [blame] | 51 | // Initializes the pairing registry on Windows. The passed key handles are |
| 52 | // already duplicated by the sender. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 53 | IPC_MESSAGE_CONTROL(ChromotingDaemonNetworkMsg_InitializePairingRegistry, |
| 54 | IPC::PlatformFileForTransit /* privileged_key */, |
| 55 | IPC::PlatformFileForTransit /* unprivileged_key */) |
[email protected] | 7fe3ce4 | 2014-02-11 02:27:48 | [diff] [blame] | 56 | |
[email protected] | 60ccc24 | 2012-10-17 21:06:24 | [diff] [blame] | 57 | // Notifies the network process that the terminal |terminal_id| has been |
| 58 | // disconnected from the desktop session. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 59 | IPC_MESSAGE_CONTROL(ChromotingDaemonNetworkMsg_TerminalDisconnected, |
| 60 | int /* terminal_id */) |
[email protected] | 60ccc24 | 2012-10-17 21:06:24 | [diff] [blame] | 61 | |
[email protected] | 12066cb | 2012-10-25 03:25:43 | [diff] [blame] | 62 | // Notifies the network process that |terminal_id| is now attached to |
sammc | f9cd299a | 2016-11-02 22:13:26 | [diff] [blame] | 63 | // a desktop integration process. |session_id| is the id of the desktop session |
| 64 | // being attached. |desktop_pipe| is the client end of the desktop-to-network |
| 65 | // pipe opened. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 66 | IPC_MESSAGE_CONTROL(ChromotingDaemonNetworkMsg_DesktopAttached, |
| 67 | int /* terminal_id */, |
| 68 | int /* session_id */, |
| 69 | IPC::ChannelHandle /* desktop_pipe */) |
[email protected] | 12066cb | 2012-10-25 03:25:43 | [diff] [blame] | 70 | |
[email protected] | 60ccc24 | 2012-10-17 21:06:24 | [diff] [blame] | 71 | //----------------------------------------------------------------------------- |
| 72 | // Chromoting messages sent from the network to the daemon process. |
| 73 | |
[email protected] | e36460f | 2013-03-08 09:29:32 | [diff] [blame] | 74 | // Connects the terminal |terminal_id| (i.e. a remote client) to a desktop |
[email protected] | 60ccc24 | 2012-10-17 21:06:24 | [diff] [blame] | 75 | // session. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 76 | IPC_MESSAGE_CONTROL(ChromotingNetworkHostMsg_ConnectTerminal, |
| 77 | int /* terminal_id */, |
| 78 | remoting::ScreenResolution /* resolution */, |
| 79 | bool /* virtual_terminal */) |
[email protected] | 60ccc24 | 2012-10-17 21:06:24 | [diff] [blame] | 80 | |
| 81 | // Disconnects the terminal |terminal_id| from the desktop session it was |
| 82 | // connected to. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 83 | IPC_MESSAGE_CONTROL(ChromotingNetworkHostMsg_DisconnectTerminal, |
| 84 | int /* terminal_id */) |
[email protected] | 12066cb | 2012-10-25 03:25:43 | [diff] [blame] | 85 | |
[email protected] | 6f526ce | 2013-03-18 04:38:56 | [diff] [blame] | 86 | // Changes the screen resolution in the given desktop session. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 87 | IPC_MESSAGE_CONTROL(ChromotingNetworkDaemonMsg_SetScreenResolution, |
| 88 | int /* terminal_id */, |
| 89 | remoting::ScreenResolution /* resolution */) |
[email protected] | 6f526ce | 2013-03-18 04:38:56 | [diff] [blame] | 90 | |
[email protected] | 39a631b | 2013-03-04 22:19:05 | [diff] [blame] | 91 | // Serialized remoting::protocol::TransportRoute structure. |
| 92 | IPC_STRUCT_BEGIN(SerializedTransportRoute) |
martijn | a46bd47a | 2016-04-06 18:05:48 | [diff] [blame] | 93 | IPC_STRUCT_MEMBER(remoting::protocol::TransportRoute::RouteType, type) |
sergeyu | f684dd192 | 2016-09-28 22:37:57 | [diff] [blame] | 94 | IPC_STRUCT_MEMBER(std::vector<uint8_t>, remote_ip) |
| 95 | IPC_STRUCT_MEMBER(uint16_t, remote_port) |
| 96 | IPC_STRUCT_MEMBER(std::vector<uint8_t>, local_ip) |
| 97 | IPC_STRUCT_MEMBER(uint16_t, local_port) |
[email protected] | 39a631b | 2013-03-04 22:19:05 | [diff] [blame] | 98 | IPC_STRUCT_END() |
| 99 | |
martijn | a46bd47a | 2016-04-06 18:05:48 | [diff] [blame] | 100 | IPC_ENUM_TRAITS_MAX_VALUE(remoting::protocol::TransportRoute::RouteType, |
| 101 | remoting::protocol::TransportRoute::ROUTE_TYPE_MAX) |
| 102 | |
[email protected] | 39a631b | 2013-03-04 22:19:05 | [diff] [blame] | 103 | // Hosts status notifications (see HostStatusObserver interface) sent by |
| 104 | // IpcHostEventLogger. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 105 | IPC_MESSAGE_CONTROL(ChromotingNetworkDaemonMsg_AccessDenied, |
| 106 | std::string /* jid */) |
[email protected] | 39a631b | 2013-03-04 22:19:05 | [diff] [blame] | 107 | |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 108 | IPC_MESSAGE_CONTROL(ChromotingNetworkDaemonMsg_ClientAuthenticated, |
| 109 | std::string /* jid */) |
[email protected] | 39a631b | 2013-03-04 22:19:05 | [diff] [blame] | 110 | |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 111 | IPC_MESSAGE_CONTROL(ChromotingNetworkDaemonMsg_ClientConnected, |
| 112 | std::string /* jid */) |
[email protected] | 39a631b | 2013-03-04 22:19:05 | [diff] [blame] | 113 | |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 114 | IPC_MESSAGE_CONTROL(ChromotingNetworkDaemonMsg_ClientDisconnected, |
| 115 | std::string /* jid */) |
[email protected] | 39a631b | 2013-03-04 22:19:05 | [diff] [blame] | 116 | |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 117 | IPC_MESSAGE_CONTROL(ChromotingNetworkDaemonMsg_ClientRouteChange, |
| 118 | std::string /* jid */, |
| 119 | std::string /* channel_name */, |
| 120 | SerializedTransportRoute /* route */) |
[email protected] | 39a631b | 2013-03-04 22:19:05 | [diff] [blame] | 121 | |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 122 | IPC_MESSAGE_CONTROL(ChromotingNetworkDaemonMsg_HostStarted, |
| 123 | std::string /* xmpp_login */) |
[email protected] | 39a631b | 2013-03-04 22:19:05 | [diff] [blame] | 124 | |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 125 | IPC_MESSAGE_CONTROL(ChromotingNetworkDaemonMsg_HostShutdown) |
[email protected] | 39a631b | 2013-03-04 22:19:05 | [diff] [blame] | 126 | |
[email protected] | 12066cb | 2012-10-25 03:25:43 | [diff] [blame] | 127 | //----------------------------------------------------------------------------- |
[email protected] | 12066cb | 2012-10-25 03:25:43 | [diff] [blame] | 128 | // Chromoting messages sent from the desktop to the daemon process. |
| 129 | |
| 130 | // Notifies the daemon that a desktop integration process has been initialized. |
| 131 | // |desktop_pipe| specifies the client end of the desktop pipe. It is to be |
| 132 | // forwarded to the desktop environment stub. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 133 | IPC_MESSAGE_CONTROL(ChromotingDesktopDaemonMsg_DesktopAttached, |
| 134 | IPC::ChannelHandle /* desktop_pipe */) |
[email protected] | ff72dd1 | 2012-11-27 05:18:25 | [diff] [blame] | 135 | |
[email protected] | 0dffd55 | 2012-12-07 01:08:09 | [diff] [blame] | 136 | // Asks the daemon to inject Secure Attention Sequence (SAS) in the session |
| 137 | // where the desktop process is running. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 138 | IPC_MESSAGE_CONTROL(ChromotingDesktopDaemonMsg_InjectSas) |
[email protected] | 0dffd55 | 2012-12-07 01:08:09 | [diff] [blame] | 139 | |
[email protected] | ff72dd1 | 2012-11-27 05:18:25 | [diff] [blame] | 140 | //----------------------------------------------------------------------------- |
| 141 | // Chromoting messages sent from the desktop to the network process. |
| 142 | |
[email protected] | b9ed58f | 2013-05-16 10:45:24 | [diff] [blame] | 143 | // Notifies the network process that a shared buffer has been created. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 144 | IPC_MESSAGE_CONTROL(ChromotingDesktopNetworkMsg_CreateSharedBuffer, |
| 145 | int /* id */, |
Matthew Cary | 7d8e48e | 2019-04-16 08:32:36 | [diff] [blame] | 146 | base::ReadOnlySharedMemoryRegion /* region */, |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 147 | uint32_t /* size */) |
[email protected] | ff72dd1 | 2012-11-27 05:18:25 | [diff] [blame] | 148 | |
| 149 | // Request the network process to stop using a shared buffer. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 150 | IPC_MESSAGE_CONTROL(ChromotingDesktopNetworkMsg_ReleaseSharedBuffer, |
| 151 | int /* id */) |
[email protected] | ff72dd1 | 2012-11-27 05:18:25 | [diff] [blame] | 152 | |
[email protected] | b9ed58f | 2013-05-16 10:45:24 | [diff] [blame] | 153 | // Serialized webrtc::DesktopFrame. |
| 154 | IPC_STRUCT_BEGIN(SerializedDesktopFrame) |
[email protected] | ff72dd1 | 2012-11-27 05:18:25 | [diff] [blame] | 155 | // ID of the shared memory buffer containing the pixels. |
| 156 | IPC_STRUCT_MEMBER(int, shared_buffer_id) |
| 157 | |
[email protected] | 0d155966 | 2012-11-27 20:23:11 | [diff] [blame] | 158 | // Width of a single row of pixels in bytes. |
| 159 | IPC_STRUCT_MEMBER(int, bytes_per_row) |
| 160 | |
[email protected] | ff72dd1 | 2012-11-27 05:18:25 | [diff] [blame] | 161 | // Captured region. |
[email protected] | b9ed58f | 2013-05-16 10:45:24 | [diff] [blame] | 162 | IPC_STRUCT_MEMBER(std::vector<webrtc::DesktopRect>, dirty_region) |
[email protected] | ff72dd1 | 2012-11-27 05:18:25 | [diff] [blame] | 163 | |
[email protected] | 739e280 | 2013-03-18 01:03:48 | [diff] [blame] | 164 | // Dimensions of the buffer in pixels. |
[email protected] | b9ed58f | 2013-05-16 10:45:24 | [diff] [blame] | 165 | IPC_STRUCT_MEMBER(webrtc::DesktopSize, dimensions) |
[email protected] | ff72dd1 | 2012-11-27 05:18:25 | [diff] [blame] | 166 | |
[email protected] | ff72dd1 | 2012-11-27 05:18:25 | [diff] [blame] | 167 | // Time spent in capture. Unit is in milliseconds. |
avi | c5960f3 | 2015-12-22 22:49:48 | [diff] [blame] | 168 | IPC_STRUCT_MEMBER(int64_t, capture_time_ms) |
[email protected] | ff72dd1 | 2012-11-27 05:18:25 | [diff] [blame] | 169 | |
sergeyu | c258bd4b | 2015-01-08 20:57:50 | [diff] [blame] | 170 | // Latest event timestamp supplied by the client for performance tracking. |
avi | c5960f3 | 2015-12-22 22:49:48 | [diff] [blame] | 171 | IPC_STRUCT_MEMBER(int64_t, latest_event_timestamp) |
[email protected] | ff72dd1 | 2012-11-27 05:18:25 | [diff] [blame] | 172 | |
| 173 | // DPI for this frame. |
[email protected] | b9ed58f | 2013-05-16 10:45:24 | [diff] [blame] | 174 | IPC_STRUCT_MEMBER(webrtc::DesktopVector, dpi) |
zijiehe | a1336afb | 2017-04-28 05:29:28 | [diff] [blame] | 175 | |
| 176 | // Capturer Id |
| 177 | IPC_STRUCT_MEMBER(uint32_t, capturer_id) |
[email protected] | ff72dd1 | 2012-11-27 05:18:25 | [diff] [blame] | 178 | IPC_STRUCT_END() |
| 179 | |
sergeyu | 546cbaa | 2016-06-17 20:39:32 | [diff] [blame] | 180 | IPC_ENUM_TRAITS_MAX_VALUE(webrtc::DesktopCapturer::Result, |
| 181 | webrtc::DesktopCapturer::Result::MAX_VALUE) |
| 182 | |
[email protected] | ff72dd1 | 2012-11-27 05:18:25 | [diff] [blame] | 183 | // Notifies the network process that a shared buffer has been created. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 184 | IPC_MESSAGE_CONTROL(ChromotingDesktopNetworkMsg_CaptureResult, |
| 185 | webrtc::DesktopCapturer::Result /* result */, |
| 186 | SerializedDesktopFrame /* frame */) |
[email protected] | ff72dd1 | 2012-11-27 05:18:25 | [diff] [blame] | 187 | |
Gary Kacmarcik | 91f5ed4 | 2018-11-29 22:24:14 | [diff] [blame] | 188 | // Notifies the network process that the host display layout has changed. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 189 | IPC_MESSAGE_CONTROL(ChromotingDesktopNetworkMsg_DisplayChanged, |
| 190 | remoting::protocol::VideoLayout /* layout */) |
Gary Kacmarcik | 91f5ed4 | 2018-11-29 22:24:14 | [diff] [blame] | 191 | |
[email protected] | 718daba | 2012-11-28 21:00:20 | [diff] [blame] | 192 | // Carries a cursor share update from the desktop session agent to the client. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 193 | IPC_MESSAGE_CONTROL(ChromotingDesktopNetworkMsg_MouseCursor, |
| 194 | webrtc::MouseCursor /* cursor */) |
[email protected] | ff72dd1 | 2012-11-27 05:18:25 | [diff] [blame] | 195 | |
[email protected] | 31014af | 2012-11-30 04:04:57 | [diff] [blame] | 196 | // Carries a clipboard event from the desktop session agent to the client. |
| 197 | // |serialized_event| is a serialized protocol::ClipboardEvent. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 198 | IPC_MESSAGE_CONTROL(ChromotingDesktopNetworkMsg_InjectClipboardEvent, |
| 199 | std::string /* serialized_event */) |
[email protected] | 31014af | 2012-11-30 04:04:57 | [diff] [blame] | 200 | |
sergeyu | ec77d854 | 2015-11-03 22:31:00 | [diff] [blame] | 201 | IPC_ENUM_TRAITS_MAX_VALUE(remoting::protocol::ErrorCode, |
| 202 | remoting::protocol::ERROR_CODE_MAX) |
| 203 | |
[email protected] | a031c97 | 2012-12-27 20:10:40 | [diff] [blame] | 204 | // Requests the network process to terminate the client session. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 205 | IPC_MESSAGE_CONTROL(ChromotingDesktopNetworkMsg_DisconnectSession, |
| 206 | remoting::protocol::ErrorCode /* error */) |
[email protected] | a031c97 | 2012-12-27 20:10:40 | [diff] [blame] | 207 | |
[email protected] | 1c969e3 | 2012-12-27 22:57:49 | [diff] [blame] | 208 | // Carries an audio packet from the desktop session agent to the client. |
| 209 | // |serialized_packet| is a serialized AudioPacket. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 210 | IPC_MESSAGE_CONTROL(ChromotingDesktopNetworkMsg_AudioPacket, |
| 211 | std::string /* serialized_packet */) |
[email protected] | 1c969e3 | 2012-12-27 22:57:49 | [diff] [blame] | 212 | |
Erik Jensen | 8f1acc1 | 2019-01-14 20:18:31 | [diff] [blame] | 213 | // Informs the network process of the result of a file operation on the file |
Erik Jensen | 042b439 | 2019-01-17 20:32:31 | [diff] [blame] | 214 | // identified by |file_id|. If |result| is an error, the file ID is no longer |
| 215 | // valid. |
| 216 | IPC_MESSAGE_CONTROL( |
| 217 | ChromotingDesktopNetworkMsg_FileResult, |
| 218 | uint64_t /* file_id */, |
| 219 | remoting::protocol::FileTransferResult<remoting::Monostate> /* result */) |
Erik Jensen | 8f1acc1 | 2019-01-14 20:18:31 | [diff] [blame] | 220 | |
Erik Jensen | dccb06a4 | 2019-01-25 01:19:27 | [diff] [blame] | 221 | // Carries the result of a read-file operation on the file identified by |
| 222 | // |file_id|. |result| is the filename and size of the selected file. If |
| 223 | // |result| is an error, the file ID is no longer valid. |
| 224 | IPC_MESSAGE_CONTROL(ChromotingDesktopNetworkMsg_FileInfoResult, |
| 225 | uint64_t /* file_id */, |
| 226 | remoting::protocol::FileTransferResult< |
| 227 | std::tuple<base::FilePath, uint64_t>> /* result */) |
| 228 | |
| 229 | // Carries the result of a file read-chunk operation on the file identified by |
| 230 | // |file_id|. |result| holds the read data. If |result| is an error, the file ID |
| 231 | // is no longer valid. |
| 232 | IPC_MESSAGE_CONTROL( |
| 233 | ChromotingDesktopNetworkMsg_FileDataResult, |
| 234 | uint64_t /* file_id */, |
| 235 | remoting::protocol::FileTransferResult<std::string> /* result */) |
| 236 | |
[email protected] | ff72dd1 | 2012-11-27 05:18:25 | [diff] [blame] | 237 | //----------------------------------------------------------------------------- |
| 238 | // Chromoting messages sent from the network to the desktop process. |
| 239 | |
[email protected] | a031c97 | 2012-12-27 20:10:40 | [diff] [blame] | 240 | // Passes the client session data to the desktop session agent and starts it. |
| 241 | // This must be the first message received from the host. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 242 | IPC_MESSAGE_CONTROL(ChromotingNetworkDesktopMsg_StartSessionAgent, |
| 243 | std::string /* authenticated_jid */, |
| 244 | remoting::ScreenResolution /* resolution */, |
| 245 | remoting::DesktopEnvironmentOptions /* options */) |
[email protected] | a031c97 | 2012-12-27 20:10:40 | [diff] [blame] | 246 | |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 247 | IPC_MESSAGE_CONTROL(ChromotingNetworkDesktopMsg_CaptureFrame) |
[email protected] | 31014af | 2012-11-30 04:04:57 | [diff] [blame] | 248 | |
Gary Kacmarcik | 0c56fda | 2019-01-17 03:10:12 | [diff] [blame] | 249 | IPC_MESSAGE_CONTROL(ChromotingNetworkDesktopMsg_SelectSource, |
| 250 | int /* desktop_display_id */) |
| 251 | |
[email protected] | 31014af | 2012-11-30 04:04:57 | [diff] [blame] | 252 | // Carries a clipboard event from the client to the desktop session agent. |
| 253 | // |serialized_event| is a serialized protocol::ClipboardEvent. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 254 | IPC_MESSAGE_CONTROL(ChromotingNetworkDesktopMsg_InjectClipboardEvent, |
| 255 | std::string /* serialized_event */) |
[email protected] | 31014af | 2012-11-30 04:04:57 | [diff] [blame] | 256 | |
| 257 | // Carries a keyboard event from the client to the desktop session agent. |
| 258 | // |serialized_event| is a serialized protocol::KeyEvent. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 259 | IPC_MESSAGE_CONTROL(ChromotingNetworkDesktopMsg_InjectKeyEvent, |
| 260 | std::string /* serialized_event */) |
[email protected] | 31014af | 2012-11-30 04:04:57 | [diff] [blame] | 261 | |
[email protected] | 529bbd1 | 2014-03-27 20:25:39 | [diff] [blame] | 262 | // Carries a keyboard event from the client to the desktop session agent. |
| 263 | // |serialized_event| is a serialized protocol::TextEvent. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 264 | IPC_MESSAGE_CONTROL(ChromotingNetworkDesktopMsg_InjectTextEvent, |
| 265 | std::string /* serialized_event */) |
[email protected] | 529bbd1 | 2014-03-27 20:25:39 | [diff] [blame] | 266 | |
[email protected] | 31014af | 2012-11-30 04:04:57 | [diff] [blame] | 267 | // Carries a mouse event from the client to the desktop session agent. |
| 268 | // |serialized_event| is a serialized protocol::MouseEvent. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 269 | IPC_MESSAGE_CONTROL(ChromotingNetworkDesktopMsg_InjectMouseEvent, |
| 270 | std::string /* serialized_event */) |
[email protected] | 6f526ce | 2013-03-18 04:38:56 | [diff] [blame] | 271 | |
rkuroiwa | d11ebf0 | 2015-03-06 01:31:45 | [diff] [blame] | 272 | // Carries a touch event from the client to the desktop session agent. |
| 273 | // |serialized_event| is a serialized protocol::TouchEvent. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 274 | IPC_MESSAGE_CONTROL(ChromotingNetworkDesktopMsg_InjectTouchEvent, |
| 275 | std::string /* serialized_event */) |
rkuroiwa | d11ebf0 | 2015-03-06 01:31:45 | [diff] [blame] | 276 | |
[email protected] | 6f526ce | 2013-03-18 04:38:56 | [diff] [blame] | 277 | // Changes the screen resolution in the desktop session. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 278 | IPC_MESSAGE_CONTROL(ChromotingNetworkDesktopMsg_SetScreenResolution, |
| 279 | remoting::ScreenResolution /* resolution */) |
joedow | 99d59d4 | 2016-03-14 20:12:43 | [diff] [blame] | 280 | |
Joe Downing | 505ae0d0 | 2018-10-17 17:47:30 | [diff] [blame] | 281 | // Carries an action request event from the client to the desktop session agent. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 282 | IPC_MESSAGE_CONTROL(ChromotingNetworkDesktopMsg_ExecuteActionRequest, |
| 283 | remoting::protocol::ActionRequest /* request */) |
Joe Downing | 505ae0d0 | 2018-10-17 17:47:30 | [diff] [blame] | 284 | |
Erik Jensen | 8f1acc1 | 2019-01-14 20:18:31 | [diff] [blame] | 285 | // Requests that the desktop process create a new file for writing with the |
Erik Jensen | dccb06a4 | 2019-01-25 01:19:27 | [diff] [blame] | 286 | // provided file name, which will be identified by |file_id|. The desktop |
| 287 | // process will respond with a FileResult message. |
Erik Jensen | 8f1acc1 | 2019-01-14 20:18:31 | [diff] [blame] | 288 | IPC_MESSAGE_CONTROL(ChromotingNetworkDesktopMsg_WriteFile, |
| 289 | uint64_t /* file_id */, |
| 290 | base::FilePath /* filename */) |
| 291 | |
| 292 | // Requests that the desktop process append the provided data chunk to the |
Erik Jensen | dccb06a4 | 2019-01-25 01:19:27 | [diff] [blame] | 293 | // previously created file identified by |file_id|. The desktop process will |
| 294 | // respond with a FileResult message. |
Erik Jensen | 8f1acc1 | 2019-01-14 20:18:31 | [diff] [blame] | 295 | IPC_MESSAGE_CONTROL(ChromotingNetworkDesktopMsg_WriteFileChunk, |
| 296 | uint64_t /* file_id */, |
| 297 | std::string /* data */) |
| 298 | |
Erik Jensen | dccb06a4 | 2019-01-25 01:19:27 | [diff] [blame] | 299 | // Prompt the user to select a file for reading, which will be identified by |
| 300 | // |file_id|. The desktop process will respond with a FileInfoResult message. |
| 301 | IPC_MESSAGE_CONTROL(ChromotingNetworkDesktopMsg_ReadFile, |
| 302 | uint64_t /* file_id */) |
| 303 | |
| 304 | // Requests that the desktop process read a data chunk from the file identified |
| 305 | // by |file_id|. The desktop process will respond with a FileDataResult message. |
| 306 | IPC_MESSAGE_CONTROL(ChromotingNetworkDesktopMsg_ReadFileChunk, |
| 307 | uint64_t /* file_id */, |
| 308 | uint64_t /* size */) |
| 309 | |
Erik Jensen | 8f1acc1 | 2019-01-14 20:18:31 | [diff] [blame] | 310 | // Requests that the desktop process close the file identified by |file_id|. |
Erik Jensen | dccb06a4 | 2019-01-25 01:19:27 | [diff] [blame] | 311 | // If the file is being written, it will be finalized, and the desktop process |
| 312 | // will respond with a FileResult message. If the file is being read, there is |
| 313 | // no response message. |
Erik Jensen | 8f1acc1 | 2019-01-14 20:18:31 | [diff] [blame] | 314 | IPC_MESSAGE_CONTROL(ChromotingNetworkDesktopMsg_CloseFile, |
| 315 | uint64_t /* file_id */) |
| 316 | |
Erik Jensen | 0efaae4 | 2019-02-22 21:01:59 | [diff] [blame] | 317 | // Requests that the desktop process cancel the file identified by |file_id|. |
| 318 | // If the file is being written, the partial file will be deleted. If the file |
| 319 | // is being read, it will be closed. In either case, there is no response |
| 320 | // message. |
Erik Jensen | 8f1acc1 | 2019-01-14 20:18:31 | [diff] [blame] | 321 | IPC_MESSAGE_CONTROL(ChromotingNetworkDesktopMsg_CancelFile, |
| 322 | uint64_t /* file_id */) |
| 323 | |
joedow | 99d59d4 | 2016-03-14 20:12:43 | [diff] [blame] | 324 | //--------------------------------------------------------------------- |
| 325 | // Chromoting messages sent from the remote_security_key process to the |
| 326 | // network process. |
| 327 | |
| 328 | // The array of bytes representing a security key request to be sent to the |
| 329 | // remote client. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 330 | IPC_MESSAGE_CONTROL(ChromotingRemoteSecurityKeyToNetworkMsg_Request, |
| 331 | std::string /* request bytes */) |
joedow | 99d59d4 | 2016-03-14 20:12:43 | [diff] [blame] | 332 | |
| 333 | //--------------------------------------------------------- |
| 334 | // Chromoting messages sent from the network process to the remote_security_key |
sammc | b90d19c | 2016-11-08 09:44:07 | [diff] [blame] | 335 | // process. |
joedow | 99d59d4 | 2016-03-14 20:12:43 | [diff] [blame] | 336 | |
joedow | afdd0e9 | 2016-12-20 03:01:34 | [diff] [blame] | 337 | // The array of bytes representing the security key response from the client. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 338 | IPC_MESSAGE_CONTROL(ChromotingNetworkToRemoteSecurityKeyMsg_Response, |
| 339 | std::string /* response bytes */) |
joedow | afdd0e9 | 2016-12-20 03:01:34 | [diff] [blame] | 340 | |
| 341 | // Indicates the channel used for security key message passing is ready for use. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 342 | IPC_MESSAGE_CONTROL(ChromotingNetworkToRemoteSecurityKeyMsg_ConnectionReady) |
joedow | afdd0e9 | 2016-12-20 03:01:34 | [diff] [blame] | 343 | |
| 344 | // Error indicating the request originated from outside the remoted session. |
| 345 | // The IPC channel will be disconnected after this message has been sent. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 346 | IPC_MESSAGE_CONTROL(ChromotingNetworkToRemoteSecurityKeyMsg_InvalidSession) |
zijiehe | 36763d8 | 2017-06-19 23:52:31 | [diff] [blame] | 347 | |
| 348 | // Starts to report process resource usage. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 349 | IPC_MESSAGE_CONTROL(ChromotingNetworkToAnyMsg_StartProcessStatsReport, |
| 350 | base::TimeDelta /* interval */) |
zijiehe | 36763d8 | 2017-06-19 23:52:31 | [diff] [blame] | 351 | |
| 352 | // Stops to report process resource usage. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 353 | IPC_MESSAGE_CONTROL(ChromotingNetworkToAnyMsg_StopProcessStatsReport) |
zijiehe | 36763d8 | 2017-06-19 23:52:31 | [diff] [blame] | 354 | |
| 355 | // Reports process resource usage to network process. |
Erik Jensen | 6d6de592 | 2018-11-30 22:51:10 | [diff] [blame] | 356 | IPC_MESSAGE_CONTROL(ChromotingAnyToNetworkMsg_ReportProcessStats, |
| 357 | remoting::protocol::AggregatedProcessResourceUsage) |