OLD | NEW |
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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/process/process_handle.h" | 10 #include "base/process/process_handle.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 // int32_t means that 64-bit processes will need to perform both up-casting | 26 // int32_t means that 64-bit processes will need to perform both up-casting |
27 // and down-casting. This is performed using the appropriate Windows apis. | 27 // and down-casting. This is performed using the appropriate Windows apis. |
28 int32_t handle; | 28 int32_t handle; |
29 // The id of the destination process that the handle is duplicated into. | 29 // The id of the destination process that the handle is duplicated into. |
30 base::ProcessId destination_process; | 30 base::ProcessId destination_process; |
31 AttachmentId attachment_id; | 31 AttachmentId attachment_id; |
32 }; | 32 }; |
33 | 33 |
34 explicit HandleAttachmentWin(const HANDLE& handle); | 34 explicit HandleAttachmentWin(const HANDLE& handle); |
35 explicit HandleAttachmentWin(const WireFormat& wire_format); | 35 explicit HandleAttachmentWin(const WireFormat& wire_format); |
| 36 explicit HandleAttachmentWin(const BrokerableAttachment::AttachmentId& id); |
36 | 37 |
37 BrokerableType GetBrokerableType() const override; | 38 BrokerableType GetBrokerableType() const override; |
| 39 void PopulateWithAttachment(const BrokerableAttachment* attachment) override; |
38 | 40 |
39 // Returns the wire format of this attachment. | 41 // Returns the wire format of this attachment. |
40 WireFormat GetWireFormat(const base::ProcessId& destination) const; | 42 WireFormat GetWireFormat(const base::ProcessId& destination) const; |
41 | 43 |
42 HANDLE get_handle() const { return handle_; } | 44 HANDLE get_handle() const { return handle_; } |
43 | 45 |
44 private: | 46 private: |
45 ~HandleAttachmentWin() override; | 47 ~HandleAttachmentWin() override; |
46 HANDLE handle_; | 48 HANDLE handle_; |
47 }; | 49 }; |
48 | 50 |
49 } // namespace internal | 51 } // namespace internal |
50 } // namespace IPC | 52 } // namespace IPC |
51 | 53 |
52 #endif // IPC_HANDLE_ATTACHMENT_WIN_H_ | 54 #endif // IPC_HANDLE_ATTACHMENT_WIN_H_ |
OLD | NEW |