OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 // Defines IPC messages used by Chromoting components. | 5 #ifndef REMOTING_HOST_CHROMOTING_MESSAGES_H_ |
| 6 #define REMOTING_HOST_CHROMOTING_MESSAGES_H_ |
| 7 |
| 8 #include "ipc/ipc_platform_file.h" |
| 9 #include "third_party/skia/include/core/SkPoint.h" |
| 10 #include "third_party/skia/include/core/SkRect.h" |
| 11 #include "third_party/skia/include/core/SkSize.h" |
| 12 |
| 13 #endif // REMOTING_HOST_CHROMOTING_MESSAGES_H_ |
6 | 14 |
7 // Multiply-included message file, no traditional include guard. | 15 // Multiply-included message file, no traditional include guard. |
8 #include "ipc/ipc_message_macros.h" | 16 #include "ipc/ipc_message_macros.h" |
9 #include "ipc/ipc_platform_file.h" | |
10 | 17 |
11 #define IPC_MESSAGE_START ChromotingMsgStart | 18 #define IPC_MESSAGE_START ChromotingMsgStart |
12 | 19 |
13 //----------------------------------------------------------------------------- | 20 //----------------------------------------------------------------------------- |
14 // Chromoting messages sent from the daemon to the network process. | 21 // Chromoting messages sent from the daemon to the network process. |
15 | 22 |
16 // Requests the network process to crash producing a crash dump. The daemon | 23 // Requests the network process to crash producing a crash dump. The daemon |
17 // sends this message when a fatal error has been detected indicating that | 24 // sends this message when a fatal error has been detected indicating that |
18 // the network process misbehaves. The daemon passes the location of the code | 25 // the network process misbehaves. The daemon passes the location of the code |
19 // that detected the error. | 26 // that detected the error. |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 // Chromoting messages sent from the desktop to the daemon process. | 83 // Chromoting messages sent from the desktop to the daemon process. |
77 | 84 |
78 // Notifies the daemon that a desktop integration process has been initialized. | 85 // Notifies the daemon that a desktop integration process has been initialized. |
79 // |desktop_pipe| specifies the client end of the desktop pipe. It is to be | 86 // |desktop_pipe| specifies the client end of the desktop pipe. It is to be |
80 // forwarded to the desktop environment stub. | 87 // forwarded to the desktop environment stub. |
81 // | 88 // |
82 // Windows only: |desktop_pipe| has to be duplicated from the desktop process by | 89 // Windows only: |desktop_pipe| has to be duplicated from the desktop process by |
83 // the receiver of the message. | 90 // the receiver of the message. |
84 IPC_MESSAGE_CONTROL1(ChromotingDesktopDaemonMsg_DesktopAttached, | 91 IPC_MESSAGE_CONTROL1(ChromotingDesktopDaemonMsg_DesktopAttached, |
85 IPC::PlatformFileForTransit /* desktop_pipe */) | 92 IPC::PlatformFileForTransit /* desktop_pipe */) |
| 93 |
| 94 //----------------------------------------------------------------------------- |
| 95 // Chromoting messages sent from the desktop to the network process. |
| 96 |
| 97 // Notifies the network process that a shared buffer has been created. Receiving |
| 98 // of this message must be confirmed by replying with |
| 99 // ChromotingNetworkDesktopMsg_SharedBufferCreated message. |
| 100 IPC_MESSAGE_CONTROL3(ChromotingDesktopNetworkMsg_CreateSharedBuffer, |
| 101 int /* id */, |
| 102 IPC::PlatformFileForTransit /* handle */, |
| 103 uint32 /* size */) |
| 104 |
| 105 // Request the network process to stop using a shared buffer. |
| 106 IPC_MESSAGE_CONTROL1(ChromotingDesktopNetworkMsg_ReleaseSharedBuffer, |
| 107 int /* id */) |
| 108 |
| 109 IPC_STRUCT_TRAITS_BEGIN(SkIPoint) |
| 110 IPC_STRUCT_TRAITS_MEMBER(fX) |
| 111 IPC_STRUCT_TRAITS_MEMBER(fY) |
| 112 IPC_STRUCT_TRAITS_END() |
| 113 |
| 114 IPC_STRUCT_TRAITS_BEGIN(SkIRect) |
| 115 IPC_STRUCT_TRAITS_MEMBER(fLeft) |
| 116 IPC_STRUCT_TRAITS_MEMBER(fTop) |
| 117 IPC_STRUCT_TRAITS_MEMBER(fRight) |
| 118 IPC_STRUCT_TRAITS_MEMBER(fBottom) |
| 119 IPC_STRUCT_TRAITS_END() |
| 120 |
| 121 IPC_STRUCT_TRAITS_BEGIN(SkISize) |
| 122 IPC_STRUCT_TRAITS_MEMBER(fWidth) |
| 123 IPC_STRUCT_TRAITS_MEMBER(fHeight) |
| 124 IPC_STRUCT_TRAITS_END() |
| 125 |
| 126 // Serialized CaptureData structure. |
| 127 IPC_STRUCT_BEGIN(SerializedCapturedData) |
| 128 // ID of the shared memory buffer containing the pixels. |
| 129 IPC_STRUCT_MEMBER(int, shared_buffer_id) |
| 130 |
| 131 // Captured region. |
| 132 IPC_STRUCT_MEMBER(std::vector<SkIRect>, dirty_region) |
| 133 |
| 134 // Dimentions of the buffer in pixels. |
| 135 IPC_STRUCT_MEMBER(SkISize, dimensions) |
| 136 |
| 137 // Pixel format. |
| 138 IPC_STRUCT_MEMBER(int32, pixel_format) |
| 139 |
| 140 // Time spent in capture. Unit is in milliseconds. |
| 141 IPC_STRUCT_MEMBER(int, capture_time_ms) |
| 142 |
| 143 // Sequence number supplied by client for performance tracking. |
| 144 IPC_STRUCT_MEMBER(int64, client_sequence_number) |
| 145 |
| 146 // DPI for this frame. |
| 147 IPC_STRUCT_MEMBER(SkIPoint, dpi) |
| 148 IPC_STRUCT_END() |
| 149 |
| 150 // Notifies the network process that a shared buffer has been created. |
| 151 IPC_MESSAGE_CONTROL1(ChromotingDesktopNetworkMsg_CaptureCompleted, |
| 152 SerializedCapturedData /* capture_data */ ) |
| 153 |
| 154 |
| 155 //----------------------------------------------------------------------------- |
| 156 // Chromoting messages sent from the network to the desktop process. |
| 157 |
| 158 // Notifies the desktop process that the shared memory buffer has been mapped to |
| 159 // the memory of the network process and so it can be safely dropped by |
| 160 // the network process at any time. |
| 161 IPC_MESSAGE_CONTROL1(ChromotingNetworkDesktopMsg_SharedBufferCreated, |
| 162 int /* id */) |
| 163 |
| 164 IPC_MESSAGE_CONTROL1(ChromotingNetworkDesktopMsg_InvalidateRegion, |
| 165 std::vector<SkIRect> /* invalid_region */ ) |
| 166 |
| 167 IPC_MESSAGE_CONTROL0(ChromotingNetworkDesktopMsg_CaptureFrame) |
OLD | NEW |