Gallery: remove CSS for mosaic mode.
[chromium-blink-merge.git] / remoting / host / chromoting_messages.h
blob3a27b38d2b10131de0792d50b1d9c8d24c7a5642
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.
5 #ifndef REMOTING_HOST_CHROMOTING_MESSAGES_H_
6 #define REMOTING_HOST_CHROMOTING_MESSAGES_H_
8 #include "ipc/ipc_platform_file.h"
9 #include "net/base/ip_endpoint.h"
10 #include "remoting/host/chromoting_param_traits.h"
11 #include "remoting/host/screen_resolution.h"
12 #include "remoting/protocol/transport.h"
13 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
15 #endif // REMOTING_HOST_CHROMOTING_MESSAGES_H_
17 // Multiply-included message file, no traditional include guard.
18 #include "ipc/ipc_message_macros.h"
20 #define IPC_MESSAGE_START ChromotingMsgStart
22 //-----------------------------------------------------------------------------
23 // Chromoting messages sent from the daemon.
25 // Requests the receiving process to crash producing a crash dump. The daemon
26 // sends this message when a fatal error has been detected indicating that
27 // the receiving process misbehaves. The daemon passes the location of the code
28 // that detected the error.
29 IPC_MESSAGE_CONTROL3(ChromotingDaemonMsg_Crash,
30 std::string /* function_name */,
31 std::string /* file_name */,
32 int /* line_number */)
34 //-----------------------------------------------------------------------------
35 // Chromoting messages sent from the daemon to the network process.
37 // Delivers the host configuration (and updates) to the network process.
38 IPC_MESSAGE_CONTROL1(ChromotingDaemonNetworkMsg_Configuration, std::string)
40 // Initializes the pairing registry on Windows. The passed key handles are
41 // already duplicated by the sender.
42 IPC_MESSAGE_CONTROL2(ChromotingDaemonNetworkMsg_InitializePairingRegistry,
43 IPC::PlatformFileForTransit /* privileged_key */,
44 IPC::PlatformFileForTransit /* unprivileged_key */)
46 // Notifies the network process that the terminal |terminal_id| has been
47 // disconnected from the desktop session.
48 IPC_MESSAGE_CONTROL1(ChromotingDaemonNetworkMsg_TerminalDisconnected,
49 int /* terminal_id */)
51 // Notifies the network process that |terminal_id| is now attached to
52 // a desktop integration process. |desktop_process| is the handle of the desktop
53 // process. |desktop_pipe| is the client end of the desktop-to-network pipe
54 // opened.
56 // Windows only: |desktop_pipe| has to be duplicated from the desktop process
57 // by the receiver of the message. |desktop_process| is already duplicated by
58 // the sender.
59 IPC_MESSAGE_CONTROL3(ChromotingDaemonNetworkMsg_DesktopAttached,
60 int /* terminal_id */,
61 base::ProcessHandle /* desktop_process */,
62 IPC::PlatformFileForTransit /* desktop_pipe */)
64 //-----------------------------------------------------------------------------
65 // Chromoting messages sent from the network to the daemon process.
67 // Connects the terminal |terminal_id| (i.e. a remote client) to a desktop
68 // session.
69 IPC_MESSAGE_CONTROL3(ChromotingNetworkHostMsg_ConnectTerminal,
70 int /* terminal_id */,
71 remoting::ScreenResolution /* resolution */,
72 bool /* virtual_terminal */)
74 // Disconnects the terminal |terminal_id| from the desktop session it was
75 // connected to.
76 IPC_MESSAGE_CONTROL1(ChromotingNetworkHostMsg_DisconnectTerminal,
77 int /* terminal_id */)
79 // Changes the screen resolution in the given desktop session.
80 IPC_MESSAGE_CONTROL2(ChromotingNetworkDaemonMsg_SetScreenResolution,
81 int /* terminal_id */,
82 remoting::ScreenResolution /* resolution */)
84 // Serialized remoting::protocol::TransportRoute structure.
85 IPC_STRUCT_BEGIN(SerializedTransportRoute)
86 IPC_STRUCT_MEMBER(int, type)
87 IPC_STRUCT_MEMBER(net::IPAddressNumber, remote_address)
88 IPC_STRUCT_MEMBER(uint16, remote_port)
89 IPC_STRUCT_MEMBER(net::IPAddressNumber, local_address)
90 IPC_STRUCT_MEMBER(uint16, local_port)
91 IPC_STRUCT_END()
93 // Hosts status notifications (see HostStatusObserver interface) sent by
94 // IpcHostEventLogger.
95 IPC_MESSAGE_CONTROL1(ChromotingNetworkDaemonMsg_AccessDenied,
96 std::string /* jid */)
98 IPC_MESSAGE_CONTROL1(ChromotingNetworkDaemonMsg_ClientAuthenticated,
99 std::string /* jid */)
101 IPC_MESSAGE_CONTROL1(ChromotingNetworkDaemonMsg_ClientConnected,
102 std::string /* jid */)
104 IPC_MESSAGE_CONTROL1(ChromotingNetworkDaemonMsg_ClientDisconnected,
105 std::string /* jid */)
107 IPC_MESSAGE_CONTROL3(ChromotingNetworkDaemonMsg_ClientRouteChange,
108 std::string /* jid */,
109 std::string /* channel_name */,
110 SerializedTransportRoute /* route */)
112 IPC_MESSAGE_CONTROL1(ChromotingNetworkDaemonMsg_HostStarted,
113 std::string /* xmpp_login */)
115 IPC_MESSAGE_CONTROL0(ChromotingNetworkDaemonMsg_HostShutdown)
117 //-----------------------------------------------------------------------------
118 // Chromoting messages sent from the desktop to the daemon process.
120 // Notifies the daemon that a desktop integration process has been initialized.
121 // |desktop_pipe| specifies the client end of the desktop pipe. It is to be
122 // forwarded to the desktop environment stub.
124 // Windows only: |desktop_pipe| has to be duplicated from the desktop process by
125 // the receiver of the message.
126 IPC_MESSAGE_CONTROL1(ChromotingDesktopDaemonMsg_DesktopAttached,
127 IPC::PlatformFileForTransit /* desktop_pipe */)
129 // Asks the daemon to inject Secure Attention Sequence (SAS) in the session
130 // where the desktop process is running.
131 IPC_MESSAGE_CONTROL0(ChromotingDesktopDaemonMsg_InjectSas)
133 //-----------------------------------------------------------------------------
134 // Chromoting messages sent from the desktop to the network process.
136 // Notifies the network process that a shared buffer has been created.
137 IPC_MESSAGE_CONTROL3(ChromotingDesktopNetworkMsg_CreateSharedBuffer,
138 int /* id */,
139 IPC::PlatformFileForTransit /* handle */,
140 uint32 /* size */)
142 // Request the network process to stop using a shared buffer.
143 IPC_MESSAGE_CONTROL1(ChromotingDesktopNetworkMsg_ReleaseSharedBuffer,
144 int /* id */)
146 // Serialized webrtc::DesktopFrame.
147 IPC_STRUCT_BEGIN(SerializedDesktopFrame)
148 // ID of the shared memory buffer containing the pixels.
149 IPC_STRUCT_MEMBER(int, shared_buffer_id)
151 // Width of a single row of pixels in bytes.
152 IPC_STRUCT_MEMBER(int, bytes_per_row)
154 // Captured region.
155 IPC_STRUCT_MEMBER(std::vector<webrtc::DesktopRect>, dirty_region)
157 // Dimensions of the buffer in pixels.
158 IPC_STRUCT_MEMBER(webrtc::DesktopSize, dimensions)
160 // Time spent in capture. Unit is in milliseconds.
161 IPC_STRUCT_MEMBER(int64, capture_time_ms)
163 // Latest event timestamp supplied by the client for performance tracking.
164 IPC_STRUCT_MEMBER(int64, latest_event_timestamp)
166 // DPI for this frame.
167 IPC_STRUCT_MEMBER(webrtc::DesktopVector, dpi)
168 IPC_STRUCT_END()
170 // Notifies the network process that a shared buffer has been created.
171 IPC_MESSAGE_CONTROL1(ChromotingDesktopNetworkMsg_CaptureCompleted,
172 SerializedDesktopFrame /* frame */ )
174 // Carries a cursor share update from the desktop session agent to the client.
175 IPC_MESSAGE_CONTROL1(ChromotingDesktopNetworkMsg_MouseCursor,
176 webrtc::MouseCursor /* cursor */ )
178 // Carries a clipboard event from the desktop session agent to the client.
179 // |serialized_event| is a serialized protocol::ClipboardEvent.
180 IPC_MESSAGE_CONTROL1(ChromotingDesktopNetworkMsg_InjectClipboardEvent,
181 std::string /* serialized_event */ )
183 // Requests the network process to terminate the client session.
184 IPC_MESSAGE_CONTROL0(ChromotingDesktopNetworkMsg_DisconnectSession)
186 // Carries an audio packet from the desktop session agent to the client.
187 // |serialized_packet| is a serialized AudioPacket.
188 IPC_MESSAGE_CONTROL1(ChromotingDesktopNetworkMsg_AudioPacket,
189 std::string /* serialized_packet */ )
191 //-----------------------------------------------------------------------------
192 // Chromoting messages sent from the network to the desktop process.
194 // Passes the client session data to the desktop session agent and starts it.
195 // This must be the first message received from the host.
196 IPC_MESSAGE_CONTROL3(ChromotingNetworkDesktopMsg_StartSessionAgent,
197 std::string /* authenticated_jid */,
198 remoting::ScreenResolution /* resolution */,
199 bool /* virtual_terminal */)
201 IPC_MESSAGE_CONTROL0(ChromotingNetworkDesktopMsg_CaptureFrame)
203 // Carries a clipboard event from the client to the desktop session agent.
204 // |serialized_event| is a serialized protocol::ClipboardEvent.
205 IPC_MESSAGE_CONTROL1(ChromotingNetworkDesktopMsg_InjectClipboardEvent,
206 std::string /* serialized_event */ )
208 // Carries a keyboard event from the client to the desktop session agent.
209 // |serialized_event| is a serialized protocol::KeyEvent.
210 IPC_MESSAGE_CONTROL1(ChromotingNetworkDesktopMsg_InjectKeyEvent,
211 std::string /* serialized_event */ )
213 // Carries a keyboard event from the client to the desktop session agent.
214 // |serialized_event| is a serialized protocol::TextEvent.
215 IPC_MESSAGE_CONTROL1(ChromotingNetworkDesktopMsg_InjectTextEvent,
216 std::string /* serialized_event */ )
218 // Carries a mouse event from the client to the desktop session agent.
219 // |serialized_event| is a serialized protocol::MouseEvent.
220 IPC_MESSAGE_CONTROL1(ChromotingNetworkDesktopMsg_InjectMouseEvent,
221 std::string /* serialized_event */ )
223 // Carries a touch event from the client to the desktop session agent.
224 // |serialized_event| is a serialized protocol::TouchEvent.
225 IPC_MESSAGE_CONTROL1(ChromotingNetworkDesktopMsg_InjectTouchEvent,
226 std::string /* serialized_event */ )
228 // Changes the screen resolution in the desktop session.
229 IPC_MESSAGE_CONTROL1(ChromotingNetworkDesktopMsg_SetScreenResolution,
230 remoting::ScreenResolution /* resolution */)