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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef IPC_HANDLE_ATTACHMENT_WIN_H_ 5 #ifndef IPC_HANDLE_ATTACHMENT_WIN_H_
6 #define IPC_HANDLE_ATTACHMENT_WIN_H_ 6 #define IPC_HANDLE_ATTACHMENT_WIN_H_
7 7
8 #include "base/process/process_handle.h"
8 #include "ipc/brokerable_attachment.h" 9 #include "ipc/brokerable_attachment.h"
9 #include "ipc/ipc_export.h" 10 #include "ipc/ipc_export.h"
10 11
11 namespace IPC { 12 namespace IPC {
12 namespace internal { 13 namespace internal {
13 14
14 // This class represents a Windows HANDLE attached to a Chrome IPC message. 15 // This class represents a Windows HANDLE attached to a Chrome IPC message.
15 class IPC_EXPORT HandleAttachmentWin : public BrokerableAttachment { 16 class IPC_EXPORT HandleAttachmentWin : public BrokerableAttachment {
17 public:
18 // The wire format for this handle.
19 struct IPC_EXPORT WireFormat {
20 // The HANDLE that is intended for duplication, or the HANDLE that has been
21 // duplicated, depending on context.
22 HANDLE handle;
23 // The id of the destination process that the handle is duplicated into.
24 base::ProcessId destination_process;
25 // 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.
26 AttachmentId attachment_id;
27 };
28
29 HandleAttachmentWin(const HANDLE& handle);
30
31 BrokerableType GetBrokerableType() const override;
32
33 // Returns the wire format of this attachment.
34 WireFormat GetWireFormat(const base::ProcessId& destination);
35
16 private: 36 private:
17 Type GetType() const override { return TYPE_WIN_HANDLE; } 37 ~HandleAttachmentWin() override;
18 HANDLE handle_; 38 HANDLE handle_;
19 }; 39 };
20 40
21 } // namespace internal 41 } // namespace internal
22 } // namespace IPC 42 } // namespace IPC
23 43
24 #endif // IPC_HANDLE_ATTACHMENT_WIN_H_ 44 #endif // IPC_HANDLE_ATTACHMENT_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698