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

Unified Diff: ipc/handle_attachment_win.h

Issue 1188923003: Stub in more IPC attachment brokering functionality. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing files. Created 5 years, 6 months 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
Index: ipc/handle_attachment_win.h
diff --git a/ipc/handle_attachment_win.h b/ipc/handle_attachment_win.h
index b539907e8283e48f32b28bdfd98b0b892b551a31..71523b55c76a9a47485807857eb883b428965d5c 100644
--- a/ipc/handle_attachment_win.h
+++ b/ipc/handle_attachment_win.h
@@ -5,6 +5,7 @@
#ifndef IPC_HANDLE_ATTACHMENT_WIN_H_
#define IPC_HANDLE_ATTACHMENT_WIN_H_
+#include "base/process/process_handle.h"
#include "ipc/brokerable_attachment.h"
#include "ipc/ipc_export.h"
@@ -13,8 +14,27 @@ namespace internal {
// This class represents a Windows HANDLE attached to a Chrome IPC message.
class IPC_EXPORT HandleAttachmentWin : public BrokerableAttachment {
+ public:
+ // The wire format for this handle.
+ struct IPC_EXPORT WireFormat {
+ // The HANDLE that is intended for duplication, or the HANDLE that has been
+ // duplicated, depending on context.
+ HANDLE handle;
+ // The id of the destination process that the handle is duplicated into.
+ base::ProcessId destination_process;
+ // The id of the attachment.
Tom Sepez 2015/06/19 18:04:11 nit: this comment doesn't add much value.
erikchen 2015/06/23 22:37:00 Removed it.
+ AttachmentId attachment_id;
+ };
+
+ HandleAttachmentWin(const HANDLE& handle);
+
+ BrokerableType GetBrokerableType() const override;
+
+ // Returns the wire format of this attachment.
+ WireFormat GetWireFormat(const base::ProcessId& destination);
+
private:
- Type GetType() const override { return TYPE_WIN_HANDLE; }
+ ~HandleAttachmentWin() override;
HANDLE handle_;
};

Powered by Google App Engine
This is Rietveld 408576698