Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Unified Diff: remoting/host/chromoting_messages.h

Issue 11413022: DesktopSessionAgent now hosts the video capturer and provides necessary plumbing to drive it via an… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixing clang compilation. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/base/shared_buffer_unittest.cc ('k') | remoting/host/desktop_process.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/chromoting_messages.h
diff --git a/remoting/host/chromoting_messages.h b/remoting/host/chromoting_messages.h
index 5cfa146ed813189e83bc2faf202ac95f64d0c547..c9a37f7168b9f3d7aa13afd17c9f3f6aa9c1f19b 100644
--- a/remoting/host/chromoting_messages.h
+++ b/remoting/host/chromoting_messages.h
@@ -2,11 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Defines IPC messages used by Chromoting components.
+#ifndef REMOTING_HOST_CHROMOTING_MESSAGES_H_
+#define REMOTING_HOST_CHROMOTING_MESSAGES_H_
+
+#include "ipc/ipc_platform_file.h"
+#include "third_party/skia/include/core/SkPoint.h"
+#include "third_party/skia/include/core/SkRect.h"
+#include "third_party/skia/include/core/SkSize.h"
+
+#endif // REMOTING_HOST_CHROMOTING_MESSAGES_H_
// Multiply-included message file, no traditional include guard.
#include "ipc/ipc_message_macros.h"
-#include "ipc/ipc_platform_file.h"
#define IPC_MESSAGE_START ChromotingMsgStart
@@ -83,3 +90,78 @@ IPC_MESSAGE_CONTROL3(ChromotingDaemonDesktopMsg_Crash,
// the receiver of the message.
IPC_MESSAGE_CONTROL1(ChromotingDesktopDaemonMsg_DesktopAttached,
IPC::PlatformFileForTransit /* desktop_pipe */)
+
+//-----------------------------------------------------------------------------
+// Chromoting messages sent from the desktop to the network process.
+
+// Notifies the network process that a shared buffer has been created. Receiving
+// of this message must be confirmed by replying with
+// ChromotingNetworkDesktopMsg_SharedBufferCreated message.
+IPC_MESSAGE_CONTROL3(ChromotingDesktopNetworkMsg_CreateSharedBuffer,
+ int /* id */,
+ IPC::PlatformFileForTransit /* handle */,
+ uint32 /* size */)
+
+// Request the network process to stop using a shared buffer.
+IPC_MESSAGE_CONTROL1(ChromotingDesktopNetworkMsg_ReleaseSharedBuffer,
+ int /* id */)
+
+IPC_STRUCT_TRAITS_BEGIN(SkIPoint)
+ IPC_STRUCT_TRAITS_MEMBER(fX)
+ IPC_STRUCT_TRAITS_MEMBER(fY)
+IPC_STRUCT_TRAITS_END()
+
+IPC_STRUCT_TRAITS_BEGIN(SkIRect)
+ IPC_STRUCT_TRAITS_MEMBER(fLeft)
+ IPC_STRUCT_TRAITS_MEMBER(fTop)
+ IPC_STRUCT_TRAITS_MEMBER(fRight)
+ IPC_STRUCT_TRAITS_MEMBER(fBottom)
+IPC_STRUCT_TRAITS_END()
+
+IPC_STRUCT_TRAITS_BEGIN(SkISize)
+ IPC_STRUCT_TRAITS_MEMBER(fWidth)
+ IPC_STRUCT_TRAITS_MEMBER(fHeight)
+IPC_STRUCT_TRAITS_END()
+
+// Serialized CaptureData structure.
+IPC_STRUCT_BEGIN(SerializedCapturedData)
+ // ID of the shared memory buffer containing the pixels.
+ IPC_STRUCT_MEMBER(int, shared_buffer_id)
+
+ // Captured region.
+ IPC_STRUCT_MEMBER(std::vector<SkIRect>, dirty_region)
+
+ // Dimentions of the buffer in pixels.
+ IPC_STRUCT_MEMBER(SkISize, dimensions)
+
+ // Pixel format.
+ IPC_STRUCT_MEMBER(int32, pixel_format)
+
+ // Time spent in capture. Unit is in milliseconds.
+ IPC_STRUCT_MEMBER(int, capture_time_ms)
+
+ // Sequence number supplied by client for performance tracking.
+ IPC_STRUCT_MEMBER(int64, client_sequence_number)
+
+ // DPI for this frame.
+ IPC_STRUCT_MEMBER(SkIPoint, dpi)
+IPC_STRUCT_END()
+
+// Notifies the network process that a shared buffer has been created.
+IPC_MESSAGE_CONTROL1(ChromotingDesktopNetworkMsg_CaptureCompleted,
+ SerializedCapturedData /* capture_data */ )
+
+
+//-----------------------------------------------------------------------------
+// Chromoting messages sent from the network to the desktop process.
+
+// Notifies the desktop process that the shared memory buffer has been mapped to
+// the memory of the network process and so it can be safely dropped by
+// the network process at any time.
+IPC_MESSAGE_CONTROL1(ChromotingNetworkDesktopMsg_SharedBufferCreated,
+ int /* id */)
+
+IPC_MESSAGE_CONTROL1(ChromotingNetworkDesktopMsg_InvalidateRegion,
+ std::vector<SkIRect> /* invalid_region */ )
+
+IPC_MESSAGE_CONTROL0(ChromotingNetworkDesktopMsg_CaptureFrame)
« no previous file with comments | « remoting/base/shared_buffer_unittest.cc ('k') | remoting/host/desktop_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698